Package org.conscrypt
Class KeyGeneratorImpl
java.lang.Object
javax.crypto.KeyGeneratorSpi
org.conscrypt.KeyGeneratorImpl
- Direct Known Subclasses:
KeyGeneratorImpl.AES,KeyGeneratorImpl.ARC4,KeyGeneratorImpl.ChaCha20,KeyGeneratorImpl.DESEDE,KeyGeneratorImpl.HmacMD5,KeyGeneratorImpl.HmacSHA1,KeyGeneratorImpl.HmacSHA224,KeyGeneratorImpl.HmacSHA256,KeyGeneratorImpl.HmacSHA384,KeyGeneratorImpl.HmacSHA512
An implementation of
KeyGenerator suitable for use with other Conscrypt
algorithms.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckKeySize(int keySize) protected byte[]doKeyGeneration(int keyBytes) protected SecretKeyprotected voidengineInit(int keySize, SecureRandom secureRandom) protected voidengineInit(SecureRandom secureRandom) protected voidengineInit(AlgorithmParameterSpec params, SecureRandom secureRandom)
-
Field Details
-
algorithm
-
secureRandom
-
keySizeBits
private int keySizeBits
-
-
Constructor Details
-
KeyGeneratorImpl
-
-
Method Details
-
checkKeySize
protected void checkKeySize(int keySize) -
engineInit
- Specified by:
engineInitin classKeyGeneratorSpi
-
engineInit
protected void engineInit(AlgorithmParameterSpec params, SecureRandom secureRandom) throws InvalidAlgorithmParameterException - Specified by:
engineInitin classKeyGeneratorSpi- Throws:
InvalidAlgorithmParameterException
-
engineInit
- Specified by:
engineInitin classKeyGeneratorSpi
-
doKeyGeneration
protected byte[] doKeyGeneration(int keyBytes) -
engineGenerateKey
- Specified by:
engineGenerateKeyin classKeyGeneratorSpi
-