Edit

Share via


Aes.GetKeyWrapPaddedLength(Int32) Method

Definition

Computes the output length of the IETF RFC 5649 AES Key Wrap with Padding Algorithm for the specified plaintext length.

public:
 static int GetKeyWrapPaddedLength(int plaintextLengthInBytes);
public static int GetKeyWrapPaddedLength(int plaintextLengthInBytes);
static member GetKeyWrapPaddedLength : int -> int
Public Shared Function GetKeyWrapPaddedLength (plaintextLengthInBytes As Integer) As Integer

Parameters

plaintextLengthInBytes
Int32

The length of the plaintext to be wrapped, in bytes.

Returns

The padded length of the key wrap for the specified plaintext.

Exceptions

plaintextLengthInBytes is less than or equal to zero.

-or-

plaintextLengthInBytes represents a plaintext length that, when wrapped, has a length that cannot be represented as a signed 32-bit integer.

Applies to