public abstract class AndroidKeyStoreKeyGeneratorSpi extends KeyGeneratorSpi
KeyGeneratorSpi
backed by Android KeyStore.Modifier and Type | Class and Description |
---|---|
static class |
AndroidKeyStoreKeyGeneratorSpi.AES |
protected static class |
AndroidKeyStoreKeyGeneratorSpi.HmacBase |
static class |
AndroidKeyStoreKeyGeneratorSpi.HmacSHA1 |
static class |
AndroidKeyStoreKeyGeneratorSpi.HmacSHA224 |
static class |
AndroidKeyStoreKeyGeneratorSpi.HmacSHA256 |
static class |
AndroidKeyStoreKeyGeneratorSpi.HmacSHA384 |
static class |
AndroidKeyStoreKeyGeneratorSpi.HmacSHA512 |
Modifier and Type | Field and Description |
---|---|
protected int |
mKeySizeBits |
Modifier | Constructor and Description |
---|---|
protected |
AndroidKeyStoreKeyGeneratorSpi(int keymasterAlgorithm,
int defaultKeySizeBits) |
protected |
AndroidKeyStoreKeyGeneratorSpi(int keymasterAlgorithm,
int keymasterDigest,
int defaultKeySizeBits) |
Modifier and Type | Method and Description |
---|---|
protected SecretKey |
engineGenerateKey()
Generates a secret key.
|
protected void |
engineInit(AlgorithmParameterSpec params,
SecureRandom random)
Initializes the key generator with the specified parameter
set and a user-provided source of randomness.
|
protected void |
engineInit(int keySize,
SecureRandom random)
Initializes this key generator for a certain keysize, using the given
source of randomness.
|
protected void |
engineInit(SecureRandom random)
Initializes the key generator.
|
protected AndroidKeyStoreKeyGeneratorSpi(int keymasterAlgorithm, int defaultKeySizeBits)
protected AndroidKeyStoreKeyGeneratorSpi(int keymasterAlgorithm, int keymasterDigest, int defaultKeySizeBits)
protected void engineInit(SecureRandom random)
KeyGeneratorSpi
engineInit
in class KeyGeneratorSpi
random
- the source of randomness for this generatorprotected void engineInit(int keySize, SecureRandom random)
KeyGeneratorSpi
engineInit
in class KeyGeneratorSpi
keySize
- the keysize. This is an algorithm-specific metric,
specified in number of bits.random
- the source of randomness for this key generatorprotected void engineInit(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
KeyGeneratorSpi
engineInit
in class KeyGeneratorSpi
params
- the key generation parametersrandom
- the source of randomness for this key generatorInvalidAlgorithmParameterException
- if params
is
inappropriate for this key generatorprotected SecretKey engineGenerateKey()
KeyGeneratorSpi
engineGenerateKey
in class KeyGeneratorSpi