AsnFormatterBinaryToString(Asn1Reader, EncodingType, EncodingFormat, Boolean) Method

Converts and formats current position af the Asn1Reader object.

Definition

Namespace: SysadminsLV.Asn1Parser
Assembly: SysadminsLV.Asn1Parser (in SysadminsLV.Asn1Parser.dll) Version: 1.2.11
C#
public static string BinaryToString(
	Asn1Reader asn,
	EncodingType encoding = EncodingType.HexRaw,
	EncodingFormat format = EncodingFormat.CRLF,
	bool forceUpperCase = false
)

Parameters

asn  Asn1Reader
Asn1Reader object in the desired state.
encoding  EncodingType  (Optional)
Specifies the encoding for formatting. Default is HexRaw
format  EncodingFormat  (Optional)
Specifies the encoding options. The default behavior is to use a carriage return/line feed (CR/LF) pair (0x0D/0x0A) to represent a new line.
forceUpperCase  Boolean  (Optional)
Specifies whether the force hex octet representation in upper case. Default is lower case.

This parameter has effect only when hex encoding is selected in the encoding parameter: Hex, HexRaw, HexAddress, HexAscii and HexAsciiAddress. For other values, this parameter is silently ignored.

Return Value

String
Encoded and formatted string.

Remarks

This method do not support the following encoding types:
  • Binary
  • Base64Any
  • StringAny
  • HexAny

Exceptions

ArgumentExceptionAn invalid encoding type was specified.

See Also