Android Guides | Samples

Java.Security.KeyStore Class

KeyStore is responsible for maintaining cryptographic keys and their owners.

See Also: KeyStore

Syntax

[Android.Runtime.Register("java/security/KeyStore", DoNotGenerateAcw=true)]
public class KeyStore : Object

Remarks

KeyStore is responsible for maintaining cryptographic keys and their owners.

The type of the system key store can be changed by setting the 'keystore.type' property in the file named JAVA_HOME/lib/security/java.security.

See Also

[Android Documentation]

Requirements

Namespace: Java.Security
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Java.Security.KeyStore are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.
Constructs a new instance of KeyStore with the given arguments.

Public Properties

[read-only]
static
DefaultTypeString. Returns the default type for KeyStore instances.
[read-only]
ProviderProvider. Returns the provider associated with this KeyStore.
[read-only]
TypeString. Returns the type of this KeyStore.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Aliases() : IEnumeration
Returns an Enumeration over all alias names stored in this KeyStore.
ContainsAlias(String) : Boolean
Indicates whether the given alias is present in this KeyStore.
DeleteEntry(String)
Deletes the entry identified with the given alias from this KeyStore.
EntryInstanceOf(String, Class) : Boolean
GetCertificate(String) : Certificate
Returns the trusted certificate for the entry with the given alias.
GetCertificateAlias(Certificate) : String
Returns the alias associated with the first entry whose certificate matches the specified certificate.
GetCertificateChain(String) : Certificate[]
Returns the certificate chain for the entry with the given alias.
GetCreationDate(String) : Date
Returns the creation date of the entry with the given alias.
GetEntry(String, KeyStore+IProtectionParameter) : KeyStore+IEntry
Returns the Entry with the given alias, using the specified ProtectionParameter.
static
GetInstance(String) : KeyStore
Returns a new instance of KeyStore with the specified type.
static
GetInstance(String, Provider) : KeyStore
Returns a new instance of KeyStore from the specified provider with the given type.
static
GetInstance(String, String) : KeyStore
Returns a new instance of KeyStore from the specified provider with the given type.
GetKey(String, Char[]) : IKey
Returns the key with the given alias, using the password to recover the key from the store.
IsCertificateEntry(String) : Boolean
Indicates whether the specified alias is associated with a NoType:java/security/KeyStore$TrustedCertificateEntry;Href=../../../reference/java/security/KeyStore.TrustedCertificateEntry.html.
IsKeyEntry(String) : Boolean
Indicates whether the specified alias is associated with either a NoType:java/security/KeyStore$PrivateKeyEntry;Href=../../../reference/java/security/KeyStore.PrivateKeyEntry.html or a NoType:java/security/KeyStore$SecretKeyEntry;Href=../../../reference/java/security/KeyStore.SecretKeyEntry.html.
Load(KeyStore+ILoadStoreParameter)
Loads this KeyStore using the specified LoadStoreParameter.
Load(Stream, Char[])
Initializes this KeyStore from the provided InputStream.
SetCertificateEntry(String, Certificate)
Associates the given alias with a certificate.
SetEntry(String, KeyStore+IEntry, KeyStore+IProtectionParameter)
Stores the given Entry in this KeyStore and associates the entry with the given alias.
SetKeyEntry(String, Byte[], Certificate[])
Associates the given alias with a key and a certificate chain.
SetKeyEntry(String, IKey, Char[], Certificate[])
Associates the given alias with the key, password and certificate chain.
Size() : Int32
Returns the number of entries stored in this KeyStore.
Store(KeyStore+ILoadStoreParameter)
Stores this KeyStore using the specified LoadStoreParameter.
Store(Stream, Char[])
Writes this KeyStore to the specified OutputStream.