KeyStore Class

Definition

This class represents a storage facility for cryptographic keys and certificates.

[Android.Runtime.Register("java/security/KeyStore", DoNotGenerateAcw=true)]
public class KeyStore : Java.Lang.Object
[<Android.Runtime.Register("java/security/KeyStore", DoNotGenerateAcw=true)>]
type KeyStore = class
    inherit Object
Inheritance
KeyStore
Attributes

Remarks

Java documentation for java.security.KeyStore.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

KeyStore(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

KeyStore(KeyStoreSpi, Provider, String)

Creates a KeyStore object of the given type, and encapsulates the given provider implementation (SPI object) in it.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
DefaultType

Returns the default keystore type as specified by the keystore.type security property, or the string "jks" (acronym for "Java keystore") if no such property exists.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
Provider

Returns the provider of this keystore.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Type

Returns the type of this keystore.

Methods

Aliases()

Lists all the alias names of this keystore.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
ContainsAlias(String)

Checks if the given alias exists in this keystore.

DeleteEntry(String)

Deletes the entry identified by the given alias from this keystore.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
EntryInstanceOf(String, Class)

Determines if the keystore Entry for the specified alias is an instance or subclass of the specified entryClass.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetCertificate(String)

Returns the certificate associated with the given alias.

GetCertificateAlias(Certificate)

Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.

GetCertificateChain(String)

Returns the certificate chain associated with the given alias.

GetCreationDate(String)

Returns the creation date of the entry identified by the given alias.

GetEntry(String, KeyStore+IProtectionParameter)

Gets a keystore Entry for the specified alias with the specified protection parameter.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetInstance(File, Char[])

Returns a loaded keystore object of the appropriate keystore type.

GetInstance(File, KeyStore+ILoadStoreParameter)
GetInstance(String)

Returns a keystore object of the specified type.

GetInstance(String, Provider)

Returns a keystore object of the specified type.

GetInstance(String, String)

Returns a keystore object of the specified type.

GetKey(String, Char[])

Returns the key associated with the given alias, using the given password to recover it.

IsCertificateEntry(String)

Returns true if the entry identified by the given alias was created by a call to setCertificateEntry, or created by a call to setEntry with a TrustedCertificateEntry.

IsKeyEntry(String)

Returns true if the entry identified by the given alias was created by a call to setKeyEntry, or created by a call to setEntry with a PrivateKeyEntry or a SecretKeyEntry.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Load(KeyStore+ILoadStoreParameter)

Loads this KeyStore from the given input stream.

Load(Stream, Char[])

Loads this KeyStore from the given input stream.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetCertificateEntry(String, Certificate)

Assigns the given trusted certificate to the given alias.

SetEntry(String, KeyStore+IEntry, KeyStore+IProtectionParameter)

Saves a keystore Entry under the specified alias.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetKeyEntry(String, Byte[], Certificate[])

Assigns the given key (that has already been protected) to the given alias.

SetKeyEntry(String, IKey, Char[], Certificate[])

Assigns the given key to the given alias, protecting it with the given password.

Size()

Retrieves the number of entries in this keystore.

Store(KeyStore+ILoadStoreParameter)

Stores this keystore to the given output stream, and protects its integrity with the given password.

Store(Stream, Char[])

Stores this keystore to the given output stream, and protects its integrity with the given password.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until either another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or a specified amount of time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to