Asn1UtilsCalculatePayloadLength Method

Calculates the ASN.1 payload length from a given ASN.1 length header.

Definition

Namespace: SysadminsLV.Asn1Parser
Assembly: SysadminsLV.Asn1Parser (in SysadminsLV.Asn1Parser.dll) Version: 1.2.11
C#
public static long CalculatePayloadLength(
	byte[] asnHeader
)

Parameters

asnHeader  Byte
A byte array that represents ASN.1 length header

Return Value

Int64
ASN.1 payload length in bytes.

Exceptions

ArgumentNullExceptionasnHeader parameter is null.
OverflowExceptionasnHeader parameter length is more than 4 bytes or is invalid value.

See Also