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
@Internal public abstract class KeyGeneratorImpl extends KeyGeneratorSpi
An implementation ofKeyGeneratorsuitable for use with other Conscrypt algorithms.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKeyGeneratorImpl.AESstatic classKeyGeneratorImpl.ARC4static classKeyGeneratorImpl.ChaCha20static classKeyGeneratorImpl.DESEDEstatic classKeyGeneratorImpl.HmacMD5static classKeyGeneratorImpl.HmacSHA1static classKeyGeneratorImpl.HmacSHA224static classKeyGeneratorImpl.HmacSHA256static classKeyGeneratorImpl.HmacSHA384static classKeyGeneratorImpl.HmacSHA512
-
Field Summary
Fields Modifier and Type Field Description protected SecureRandomsecureRandom
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckKeySize(int keySize)protected byte[]doKeyGeneration(int keyBytes)protected SecretKeyengineGenerateKey()protected voidengineInit(int keySize, SecureRandom secureRandom)protected voidengineInit(SecureRandom secureRandom)protected voidengineInit(AlgorithmParameterSpec params, SecureRandom secureRandom)
-
-
-
Field Detail
-
secureRandom
protected SecureRandom secureRandom
-
-
Method Detail
-
checkKeySize
protected void checkKeySize(int keySize)
-
engineInit
protected void engineInit(SecureRandom secureRandom)
- Specified by:
engineInitin classKeyGeneratorSpi
-
engineInit
protected void engineInit(AlgorithmParameterSpec params, SecureRandom secureRandom) throws InvalidAlgorithmParameterException
- Specified by:
engineInitin classKeyGeneratorSpi- Throws:
InvalidAlgorithmParameterException
-
engineInit
protected void engineInit(int keySize, SecureRandom secureRandom)- Specified by:
engineInitin classKeyGeneratorSpi
-
doKeyGeneration
protected byte[] doKeyGeneration(int keyBytes)
-
engineGenerateKey
protected SecretKey engineGenerateKey()
- Specified by:
engineGenerateKeyin classKeyGeneratorSpi
-
-