Cipher.Wrap(IKey) Cipher.Wrap(IKey) Method

Definition

Wraps a key using this cipher instance.

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

Parameters

key
IKey IKey

the key to wrap.

Returns

Byte[]

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

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