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 class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkKeySize
(int keySize) protected byte[]
doKeyGeneration
(int keyBytes) protected SecretKey
protected void
engineInit
(int keySize, SecureRandom secureRandom) protected void
engineInit
(SecureRandom secureRandom) protected void
engineInit
(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:
engineInit
in classKeyGeneratorSpi
-
engineInit
protected void engineInit(AlgorithmParameterSpec params, SecureRandom secureRandom) throws InvalidAlgorithmParameterException - Specified by:
engineInit
in classKeyGeneratorSpi
- Throws:
InvalidAlgorithmParameterException
-
engineInit
- Specified by:
engineInit
in classKeyGeneratorSpi
-
doKeyGeneration
protected byte[] doKeyGeneration(int keyBytes) -
engineGenerateKey
- Specified by:
engineGenerateKey
in classKeyGeneratorSpi
-