Class HmacMD5KeyGenerator
java.lang.Object
javax.crypto.KeyGeneratorSpi
com.ibm.crypto.hdwrCCA.provider.HmacMD5KeyGenerator
This class generates a secret key for use with the HMAC-MD5 algorithm.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SecretKeyGenerates an HMAC-MD5 key.protected voidengineInit(int keysize, SecureRandom random) Initializes this key generator for a certain keysize, using the given source of randomness.protected voidengineInit(SecureRandom random) Initializes this key generator.protected voidengineInit(AlgorithmParameterSpec params, SecureRandom random) Initializes this key generator with the specified parameter set and a user-provided source of randomness.
-
Constructor Details
-
HmacMD5KeyGenerator
public HmacMD5KeyGenerator()Verify the JCE framework in the constructor.- Throws:
SecurityException- if fails to verify the JCE framework.
-
-
Method Details
-
engineInit
Initializes this key generator.- Specified by:
engineInitin classKeyGeneratorSpi- Parameters:
random- the source of randomness for this generator
-
engineInit
protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException Initializes this key generator with the specified parameter set and a user-provided source of randomness.- Specified by:
engineInitin classKeyGeneratorSpi- Parameters:
params- the key generation parametersrandom- the source of randomness for this key generator- Throws:
InvalidAlgorithmParameterException- ifparamsis inappropriate for this key generator
-
engineInit
Initializes this key generator for a certain keysize, using the given source of randomness.- Specified by:
engineInitin classKeyGeneratorSpi- Parameters:
keysize- the keysize. This is an algorithm-specific metric specified in number of bits.random- the source of randomness for this key generator
-
engineGenerateKey
Generates an HMAC-MD5 key.- Specified by:
engineGenerateKeyin classKeyGeneratorSpi- Returns:
- the new HMAC-MD5 key
-