Cipher.Unwrap(Byte[], String, KeyType) Cipher.Unwrap(Byte[], String, KeyType) Method

Definition

Unwraps a key using this cipher instance.

[Android.Runtime.Register("unwrap", "([BLjava/lang/String;I)Ljava/security/Key;", "")]
public Java.Security.IKey Unwrap (byte[] wrappedKey, string wrappedKeyAlgorithm, Javax.Crypto.KeyType wrappedKeyType);
member this.Unwrap : byte[] * string * Javax.Crypto.KeyType -> Java.Security.IKey

Parameters

wrappedKey
Byte[]

the wrapped key to unwrap.

wrappedKeyAlgorithm
String String

the algorithm for the wrapped key.

wrappedKeyType
KeyType KeyType

the type of the wrapped key (one of: SECRET_KEY , PRIVATE_KEY or PUBLIC_KEY)

Returns

Exceptions

if the wrappedKey can not be unwrapped to a key of type wrappedKeyType for the wrappedKeyAlgorithm.

if no provider can be found that can create a key of type wrappedKeyType for the wrappedKeyAlgorithm.

if this cipher instance is not initialized for unwrapping.

Remarks

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