Java.Security.KeyStore.SetKeyEntry Method
Associates the given alias with the key, password and certificate chain.

Syntax

[Android.Runtime.Register("setKeyEntry", "(Ljava/lang/String;Ljava/security/Key;[C[Ljava/security/cert/Certificate;)V", "")]
public void SetKeyEntry (string alias, IKey key, char[] password, Java.Security.Cert.Certificate[] chain)

Parameters

alias
the alias for the key.
key
the key.
password
the password.
chain
the certificate chain.

Exceptions

TypeReason
Java.Security.KeyStoreExceptionif this KeyStore is not initialized.
Java.Lang.IllegalArgumentExceptionif key is a PrivateKey and chain does not contain any certificates.
Java.Lang.NullPointerExceptionif alias is null.

Remarks

Associates the given alias with the key, password and certificate chain.

If the specified alias already exists, it will be reassigned.

[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