Edit

Share via


Aes.DecryptKeyWrapPaddedCore Method

Definition

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

protected:
 virtual int DecryptKeyWrapPaddedCore(ReadOnlySpan<System::Byte> source, Span<System::Byte> destination);
protected virtual int DecryptKeyWrapPaddedCore(ReadOnlySpan<byte> source, Span<byte> destination);
abstract member DecryptKeyWrapPaddedCore : ReadOnlySpan<byte> * Span<byte> -> int
override this.DecryptKeyWrapPaddedCore : ReadOnlySpan<byte> * Span<byte> -> int
Protected Overridable Function DecryptKeyWrapPaddedCore (source As ReadOnlySpan(Of Byte), destination As Span(Of Byte)) As Integer

Parameters

source
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

The unwrap algorithm failed to unwrap the ciphertext.

-or-

An error occurred during the cryptographic operation.

Remarks

When called by the base class, source is pre-validated to be at least 16 bytes long and a multiple of 8 bytes.

When called by the base class, destination will always be exactly 8 bytes shorter than source, so any valid value will always fit.

Applies to