FileDocCategorySizeDatePackage
KeyStoreParameter.javaAPI DocAndroid 5.1 API4370Thu Mar 12 22:22:30 GMT 2015android.security

KeyStoreParameter

public final class KeyStoreParameter extends Object implements java.security.KeyStore.ProtectionParameter
This provides the optional parameters that can be specified for {@code KeyStore} entries that work with Android KeyStore facility. The Android KeyStore facility is accessed through a {@link java.security.KeyStore} API using the {@code AndroidKeyStore} provider. The {@code context} passed in may be used to pop up some UI to ask the user to unlock or initialize the Android KeyStore facility.

Any entries placed in the {@code KeyStore} may be retrieved later. Note that there is only one logical instance of the {@code KeyStore} per application UID so apps using the {@code sharedUid} facility will also share a {@code KeyStore}.

Keys may be generated using the {@link KeyPairGenerator} facility with a {@link KeyPairGeneratorSpec} to specify the entry's {@code alias}. A self-signed X.509 certificate will be attached to generated entries, but that may be replaced at a later time by a certificate signed by a real Certificate Authority.

Fields Summary
private int
mFlags
Constructors Summary
private KeyStoreParameter(int flags)

        mFlags = flags;
    
Methods Summary
public intgetFlags()

hide

        return mFlags;
    
public booleanisEncryptionRequired()
Returns {@code true} if this parameter requires entries to be encrypted on the disk.

        return (mFlags & KeyStore.FLAG_ENCRYPTED) != 0;