Android Guides | Samples

Javax.Crypto.SecretKeyFactory.GetKeySpec Method

Returns the key specification of the specified secret key.

Syntax

[Android.Runtime.Register("getKeySpec", "(Ljavax/crypto/SecretKey;Ljava/lang/Class;)Ljava/security/spec/KeySpec;", "")]
public IKeySpec GetKeySpec (ISecretKey key, Class keySpec)

Parameters

key
the secret key to get the specification from.
keySpec
the target key specification class.

Exceptions

TypeReason
InvalidKeySpecExceptionif the specified secret key cannot be transformed into the requested key specification.

Remarks

Returns the key specification of the specified secret key.

[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