SecretKeyFactory.GenerateSecret(IKeySpec) Method

Definition

Generates a SecretKey object from the provided key specification (key material).

[Android.Runtime.Register("generateSecret", "(Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey;", "")]
public Javax.Crypto.ISecretKey? GenerateSecret (Java.Security.Spec.IKeySpec? keySpec);
[<Android.Runtime.Register("generateSecret", "(Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey;", "")>]
member this.GenerateSecret : Java.Security.Spec.IKeySpec -> Javax.Crypto.ISecretKey

Parameters

keySpec
IKeySpec

the specification (key material) of the secret key

Returns

the secret key

Attributes

Exceptions

if the specified key specification cannot be used to generate a secret key.

Remarks

Generates a SecretKey object from the provided key specification (key material).

Java documentation for javax.crypto.SecretKeyFactory.generateSecret(java.security.spec.KeySpec).

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.

Applies to