Edit

Share via


Aes.DecryptKeyWrapPadded Method

Definition

Overloads

DecryptKeyWrapPadded(Byte[])

Unwraps a key that was wrapped using the IETF RFC 5649 AES Key Wrap with Padding algorithm.

DecryptKeyWrapPadded(ReadOnlySpan<Byte>)

Unwraps a key that was wrapped using the IETF RFC 5649 AES Key Wrap with Padding algorithm.

DecryptKeyWrapPadded(ReadOnlySpan<Byte>, Span<Byte>)

Unwraps a key that was wrapped using the IETF RFC 5649 AES Key Wrap with Padding algorithm.

DecryptKeyWrapPadded(Byte[])

Unwraps a key that was wrapped using the IETF RFC 5649 AES Key Wrap with Padding algorithm.

public:
 cli::array <System::Byte> ^ DecryptKeyWrapPadded(cli::array <System::Byte> ^ ciphertext);
public byte[] DecryptKeyWrapPadded(byte[] ciphertext);
member this.DecryptKeyWrapPadded : byte[] -> byte[]
Public Function DecryptKeyWrapPadded (ciphertext As Byte()) As Byte()

Parameters

ciphertext
Byte[]

The data to unwrap.

Returns

Byte[]

The unwrapped key.

Exceptions

ciphertext is null.

ciphertext has a Length that does not correspond to the output of the Key Wrap with Padding algorithm.

Applies to

DecryptKeyWrapPadded(ReadOnlySpan<Byte>)

Unwraps a key that was wrapped using the IETF RFC 5649 AES Key Wrap with Padding algorithm.

public:
 cli::array <System::Byte> ^ DecryptKeyWrapPadded(ReadOnlySpan<System::Byte> ciphertext);
public byte[] DecryptKeyWrapPadded(ReadOnlySpan<byte> ciphertext);
member this.DecryptKeyWrapPadded : ReadOnlySpan<byte> -> byte[]
Public Function DecryptKeyWrapPadded (ciphertext As ReadOnlySpan(Of Byte)) As Byte()

Parameters

ciphertext
ReadOnlySpan<Byte>

The data to unwrap.

Returns

Byte[]

The unwrapped key.

Exceptions

ciphertext has a Length that does not correspond to the output of the Key Wrap with Padding algorithm.

Applies to

DecryptKeyWrapPadded(ReadOnlySpan<Byte>, Span<Byte>)

Unwraps a key that was wrapped using the IETF RFC 5649 AES Key Wrap with Padding algorithm.

public:
 int DecryptKeyWrapPadded(ReadOnlySpan<System::Byte> ciphertext, Span<System::Byte> destination);
public int DecryptKeyWrapPadded(ReadOnlySpan<byte> ciphertext, Span<byte> destination);
member this.DecryptKeyWrapPadded : ReadOnlySpan<byte> * Span<byte> -> int
Public Function DecryptKeyWrapPadded (ciphertext As ReadOnlySpan(Of Byte), destination As Span(Of Byte)) As Integer

Parameters

ciphertext
ReadOnlySpan<Byte>

The data to unwrap.

destination
Span<Byte>

The buffer to receive the unwrapped key.

Returns

The number of bytes in the unwrapped key.

Exceptions

ciphertext has a Length that does not correspond to the output of the Key Wrap with Padding algorithm.

-or-

destination has a Length that is more than 16 bytes shorter than ciphertext, thus guaranteed too short to hold the unwrapped key.

ciphertext and destination overlap.

-or-

The unwrap algorithm failed to unwrap the ciphertext.

-or-

An error occurred during the cryptographic operation.

Applies to