다음을 통해 공유


CipherSpi.EngineUnwrap(Byte[], String, Int32) Method

Definition

Unwrap a previously wrapped key.

[Android.Runtime.Register("engineUnwrap", "([BLjava/lang/String;I)Ljava/security/Key;", "GetEngineUnwrap_arrayBLjava_lang_String_IHandler")]
protected virtual Java.Security.IKey? EngineUnwrap (byte[]? wrappedKey, string? wrappedKeyAlgorithm, int wrappedKeyType);
[<Android.Runtime.Register("engineUnwrap", "([BLjava/lang/String;I)Ljava/security/Key;", "GetEngineUnwrap_arrayBLjava_lang_String_IHandler")>]
abstract member EngineUnwrap : byte[] * string * int -> Java.Security.IKey
override this.EngineUnwrap : byte[] * string * int -> Java.Security.IKey

Parameters

wrappedKey
Byte[]

the key to be unwrapped.

wrappedKeyAlgorithm
String

the algorithm associated with the wrapped key.

wrappedKeyType
Int32

the type of the wrapped key. This is one of SECRET_KEY, PRIVATE_KEY, or PUBLIC_KEY.

Returns

the unwrapped key.

Attributes

Exceptions

if the wrappedKey cannot 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.

Remarks

Unwrap a previously wrapped key.

This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.) It may be overridden by a provider to unwrap a previously wrapped key. Such an override is expected to throw an InvalidKeyException if the given wrapped key cannot be unwrapped. If this method is not overridden, it always throws an UnsupportedOperationException.

Java documentation for javax.crypto.CipherSpi.engineUnwrap(byte[], java.lang.String, int).

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