public abstract class HMacKeyGenerator
extends javax.crypto.KeyGeneratorSpi
An HMAC key generation algorithm can be obtained using the Java Cryptography
Architecture (JCA), by requesting the '<algorithm>' key generator from
the Entrust
cryptographic service provider. This can be done using the following call:
KeyGenerator.getInstance("<algorithm>", "Entrust");
HMac| Modifier and Type | Method and Description |
|---|---|
protected javax.crypto.SecretKey |
engineGenerateKey()
Generates a secret key.
|
protected void |
engineInit(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
Initializes the key generator with the specified parameter set and a
user-provided source of randomness.
|
protected void |
engineInit(int keysize,
java.security.SecureRandom random)
Initializes this key generator for a certain keysize, using the given
source of randomness.
|
protected void |
engineInit(java.security.SecureRandom random)
Initializes the key generator.
|
protected final void engineInit(java.security.SecureRandom random)
engineInit in class javax.crypto.KeyGeneratorSpirandom - [FIPS 140-2 control input] the source of randomness for this
generatorFips140ErrorStateException - [FIPS 140-2 status output] thrown if the Toolkit is not
allowed to perform cryptographic operationsprotected final void engineInit(int keysize,
java.security.SecureRandom random)
engineInit in class javax.crypto.KeyGeneratorSpikeysize - [FIPS 140-2 data input] the keysize. This is an
algorithm-specific metric, specified in number of bits.random - [FIPS 140-2 control input] the source of randomness for this
key generatorjava.security.InvalidParameterException - [FIPS 140-2 status output] if the keysize is wrong or not
supported.Fips140ErrorStateException - [FIPS 140-2 status output] thrown if the Toolkit is not
allowed to perform cryptographic operationsprotected final void engineInit(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
engineInit in class javax.crypto.KeyGeneratorSpiparams - [FIPS 140-2 data input] the key generation parametersrandom - [FIPS 140-2 control input] the source of randomness for this
key generatorjava.security.InvalidAlgorithmParameterException - [FIPS 140-2 status output] if params is
inappropriate for this key generatorFips140ErrorStateException - [FIPS 140-2 status output] thrown if the Toolkit is not
allowed to perform cryptographic operationsprotected final javax.crypto.SecretKey engineGenerateKey()
engineGenerateKey in class javax.crypto.KeyGeneratorSpiFips140ErrorStateException - [FIPS 140-2 status output] thrown if the Toolkit is not
allowed to perform cryptographic operations