public class MacKeySHA224Generator
extends javax.crypto.KeyGeneratorSpi
This class SHOULD NOT be used directly; it should only be used through the JCA/JCE.
KeyMaterialGenerator| Constructor and Description |
|---|
MacKeySHA224Generator()
The constructor; creates a new instance of the PKCS#12-MAC-SHA224 key generation
algorithm.
|
| 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.
|
public MacKeySHA224Generator()
Applications should not use this constructor, instead the key generation
algorithm should be requested from the appropriate JCA/JCE cryptographic
service provider as follows:
KeyGenerator.getInstance("PKCS#12-MAC-SHA224", "Entrust").
protected void engineInit(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
throws java.security.InvalidAlgorithmParameterException
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 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 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 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