Share via


RsaKeyWrapProvider.WrapKey(Byte[]) Method

Definition

Wrap a key using RSA encryption.

public override byte[] WrapKey (byte[] keyBytes);
override this.WrapKey : byte[] -> byte[]
Public Overrides Function WrapKey (keyBytes As Byte()) As Byte()

Parameters

keyBytes
Byte[]

the key to be wrapped

Returns

Byte[]

A wrapped key

Exceptions

'keyBytes' is null or has length == 0.

Failed to wrap the 'keyBytes'.

If the internal RSA algorithm is null.

Applies to