Udostępnij za pośrednictwem


Cipher.Wrap(IKey) Method

Definition

Wrap a key.

[Android.Runtime.Register("wrap", "(Ljava/security/Key;)[B", "")]
public byte[]? Wrap (Java.Security.IKey? key);
[<Android.Runtime.Register("wrap", "(Ljava/security/Key;)[B", "")>]
member this.Wrap : Java.Security.IKey -> byte[]

Parameters

key
IKey

the key to be wrapped.

Returns

Byte[]

the wrapped key.

Attributes

Exceptions

if the size of the resulting bytes is not a multiple of the cipher block size.

if this cipher instance can not wrap this key.

if this cipher instance is not initialized for wrapping.

Remarks

Wrap a key.

Java documentation for javax.crypto.Cipher.wrap(java.security.Key).

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