次の方法で共有


SecretKeyFactory.GetKeySpec(ISecretKey, Class) Method

Definition

Returns a specification (key material) of the given key object in the requested format.

[Android.Runtime.Register("getKeySpec", "(Ljavax/crypto/SecretKey;Ljava/lang/Class;)Ljava/security/spec/KeySpec;", "")]
public Java.Security.Spec.IKeySpec? GetKeySpec (Javax.Crypto.ISecretKey? key, Java.Lang.Class? keySpec);
[<Android.Runtime.Register("getKeySpec", "(Ljavax/crypto/SecretKey;Ljava/lang/Class;)Ljava/security/spec/KeySpec;", "")>]
member this.GetKeySpec : Javax.Crypto.ISecretKey * Java.Lang.Class -> Java.Security.Spec.IKeySpec

Parameters

key
ISecretKey

the key

keySpec
Class

the requested format in which the key material shall be returned

Returns

the underlying key specification (key material) in the requested format

Attributes

Exceptions

if the specified secret key cannot be transformed into the requested key specification.

Remarks

Returns a specification (key material) of the given key object in the requested format.

Java documentation for javax.crypto.SecretKeyFactory.getKeySpec(javax.crypto.SecretKey, java.lang.Class<?>).

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