Rediger

Del via


PemEncoding.GetEncodedSize(Int32, Int32) Method

Definition

Determines the length of a PEM-encoded value, in characters, given the length of a label and binary data.

public:
 static int GetEncodedSize(int labelLength, int dataLength);
public static int GetEncodedSize (int labelLength, int dataLength);
static member GetEncodedSize : int * int -> int
Public Shared Function GetEncodedSize (labelLength As Integer, dataLength As Integer) As Integer

Parameters

labelLength
Int32

The length of the label, in characters.

dataLength
Int32

The length of the data, in bytes.

Returns

The number of characters in the encoded PEM.

Exceptions

labelLength is a negative value.

-or-

dataLength is a negative value.

-or-

labelLength exceeds the maximum possible label length.

-or-

dataLength exceeds the maximum possible encoded data length.

The length of the PEM-encoded value is larger than Int32.MaxValue.

Applies to