AsnFormatterStringToBinary Method

Converts previously formatted string back to a byte array.

Definition

Namespace: SysadminsLV.Asn1Parser
Assembly: SysadminsLV.Asn1Parser (in SysadminsLV.Asn1Parser.dll) Version: 1.2.11
C#
public static byte[] StringToBinary(
	string input,
	EncodingType encoding = EncodingType.Base64
)

Parameters

input  String
Formatted string
encoding  EncodingType  (Optional)
Specifies the string encoding

Return Value

Byte
Original byte array.

Remarks

This method may not be fully compatible with BinaryToString method.

If encoding parameter is set to Base64Header, the method will accept any properly formatted PEM header and footer.

Exceptions

ArgumentExceptionAnd invalid encoding is specified.
InvalidDataExceptionThe string cannot be decoded.

See Also