Android Guides | Samples

Javax.Crypto.SecretKeyFactory.GenerateSecret Method

Generate a secret key from the specified key specification.

Syntax

[Android.Runtime.Register("generateSecret", "(Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey;", "")]
public ISecretKey GenerateSecret (IKeySpec keySpec)

Parameters

keySpec
the key specification.

Exceptions

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

Remarks

Generate a secret key from the specified key specification.

[Android Documentation]

Requirements

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