|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.crypto.KeyGeneratorSpi | +--iaik.pkcs.pkcs12.KeyMaterialGenerator | +--iaik.pkcs.pkcs12.IvGenerator
This class uses the KeyMaterialGenerator for deriving a PKCS#12 IV from a password, a salt and an iteration count.
KeyMaterialGenerator
Field Summary | |
protected String |
hash_algorithm
|
protected int |
ID
|
Constructor Summary | |
IvGenerator()
Default Constructor. |
Method Summary | |
protected SecretKey |
engineGenerateKey()
Generates the desired key material and returns it as a SecretKey. |
protected void |
engineInit(AlgorithmParameterSpec params,
SecureRandom random)
Inits this KeyMaterialGenerator. |
protected void |
engineInit(int keylen,
SecureRandom random)
Sets the lenght of the key to generate. |
protected void |
engineInit(SecureRandom random)
Not implemented. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int ID
protected String hash_algorithm
Constructor Detail |
public IvGenerator()
Method Detail |
protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
engineInit
in class KeyGeneratorSpi
params
- the required parameters as PBEKeyAndParameterSpecrandom
- not needed by this key generatorprotected void engineInit(int keylen, SecureRandom random)
engineInit
in class KeyGeneratorSpi
javax.crypto.KeyGeneratorSpi
strength
- the strength of the key to be createdrandom
- the random seedprotected void engineInit(SecureRandom random)
engineInit
in class KeyGeneratorSpi
javax.crypto.KeyGeneratorSpi
random
- the random seedKeyGenerator.init(java.security.SecureRandom)
protected SecretKey engineGenerateKey()
String algorithm = ...; KeyGenerator keyGen = KeyGenerator.getInstance("PKCS#12", "IAIK"); ... iaik.security.cipher.SecretKey secretKey = (iaik.security.cipher.SecretKey)keyGen.generateKey(); secretKey.setAlgorithm(algorithm);
engineGenerateKey
in class KeyGeneratorSpi
javax.crypto.KeyGeneratorSpi
KeyGenerator.generateKey()
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |