java.lang.Object | |
↳ | android.security.KeyPairGeneratorSpec |
This provides the required parameters needed for initializing the
KeyPairGenerator
that works with
Android KeyStore
facility
. The Android KeyStore facility is accessed through a
KeyPairGenerator
API using the
AndroidKeyStore
provider. The
context
passed in may be used to pop up some UI to ask
the user to unlock or initialize the Android KeyStore facility.
After generation, the
keyStoreAlias
is used with the
getEntry(String, java.security.KeyStore.ProtectionParameter)
interface to retrieve the
PrivateKey
and its associated
Certificate
chain.
The KeyPair generator will create a self-signed certificate with the subject
as its X.509v3 Subject Distinguished Name and as its X.509v3 Issuer
Distinguished Name along with the other parameters specified with the
KeyPairGeneratorSpec.Builder
.
The self-signed X.509 certificate may be replaced at a later time by a certificate signed by a real Certificate Authority.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
KeyPairGeneratorSpec.Builder |
Builder class for
KeyPairGeneratorSpec
objects.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Returns the
AlgorithmParameterSpec
that will be used for creation
of the key pair.
|
||||||||||
|
Gets the Android context used for operations with this instance.
|
||||||||||
|
Gets the end date to be used on the X.509 certificate that will be put in
the
KeyStore
.
|
||||||||||
|
Returns the key size specified by this parameter.
|
||||||||||
|
Returns the key type (e.g., "RSA", "DSA", "EC") specified by this
parameter.
|
||||||||||
|
Returns the alias that will be used in the
java.security.KeyStore
in conjunction with the
AndroidKeyStore
.
|
||||||||||
|
Gets the serial number to be used on the X.509 certificate that will be
put in the
KeyStore
.
|
||||||||||
|
Gets the start date to be used on the X.509 certificate that will be put
in the
KeyStore
.
|
||||||||||
|
Gets the subject distinguished name to be used on the X.509 certificate
that will be put in the
KeyStore
.
|
||||||||||
|
Returns
true
if this parameter will require generated keys to be
encrypted in the
KeyStore
.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returns the
AlgorithmParameterSpec
that will be used for creation
of the key pair.
Gets the Android context used for operations with this instance.
Gets the end date to be used on the X.509 certificate that will be put in
the
KeyStore
.
Returns the key size specified by this parameter. For instance, for RSA this will return the modulus size and for EC it will return the field size.
Returns the key type (e.g., "RSA", "DSA", "EC") specified by this parameter.
Returns the alias that will be used in the
java.security.KeyStore
in conjunction with the
AndroidKeyStore
.
Gets the serial number to be used on the X.509 certificate that will be
put in the
KeyStore
.
Gets the start date to be used on the X.509 certificate that will be put
in the
KeyStore
.
Gets the subject distinguished name to be used on the X.509 certificate
that will be put in the
KeyStore
.
Returns
true
if this parameter will require generated keys to be
encrypted in the
KeyStore
.