EncodingType Enumeration

This enumeration contains string formats used in CryptoAPI. See remarks for string formats examples.

Definition

Namespace: SysadminsLV.Asn1Parser
Assembly: SysadminsLV.Asn1Parser (in SysadminsLV.Asn1Parser.dll) Version: 1.2.11
C#
public enum EncodingType

Remarks

The following section displays example string formats.

Example

Base64Header
C#
-----BEGIN CERTIFICATE-----
MIIEITCCA+CgAwIBAgIUKMmxmDbjbHqt+Yzwj5lflBxuQwEwCQYHKoZIzjgEAzAjMSEwHwYDVQQD
ExhUb2tlbiBTaWduaW5nIFB1YmxpYyBLZXkwHhcNMTIxMTE2MTgzODMwWhcNMTIxMTIzMTgzODMw
WjAtMSswKQYDVQQDHiIAYgBiADEANAAxADkAYQAyAGMAZgBjADEAZQAwADAAOAAAMIGfMA0GCSqG
<...>
-----END CERTIFICATE-----

Example

Base64
C#
MIIEITCCA+CgAwIBAgIUKMmxmDbjbHqt+Yzwj5lflBxuQwEwCQYHKoZIzjgEAzAjMSEwHwYDVQQD
ExhUb2tlbiBTaWduaW5nIFB1YmxpYyBLZXkwHhcNMTIxMTE2MTgzODMwWhcNMTIxMTIzMTgzODMw
WjAtMSswKQYDVQQDHiIAYgBiADEANAAxADkAYQAyAGMAZgBjADEAZQAwADAAOAAAMIGfMA0GCSqG
<...>

Example

Base64RequestHeader
C#
-----BEGIN NEW CERTIFICATE REQUEST-----
MIIDBjCCAm8CAQAwcTERMA8GA1UEAxMIcXV1eC5jb20xDzANBgNVBAsTBkJyYWlu
czEWMBQGA1UEChMNRGV2ZWxvcE1lbnRvcjERMA8GA1UEBxMIVG9ycmFuY2UxEzAR
BgNVBAgTCkNhbGlmb3JuaWExCzAJBgNVBAYTAlVTMIGfMA0GCSqGSIb3DQEBAQUA
<...>
-----END NEW CERTIFICATE REQUEST-----

Example

Hex
C#
3a 20 63 65 72 74 6c 69  62 5c 6c 64 61 70 2e 63
70 70 28 32 31 33 31 29  3a 20 6c 64 61 70 65 72
<...>

Example

HexAscii
C#
3a 20 63 65 72 74 6c 69  62 5c 6c 64 61 70 2e 63   : certlib\ldap.c
70 70 28 32 31 33 31 29  3a 20 6c 64 61 70 65 72   pp(2131): ldaper
<...>

Example

Base64CrlHeader
C#
-----BEGIN X509 CRL-----
MIIDBjCCAm8CAQAwcTERMA8GA1UEAxMIcXV1eC5jb20xDzANBgNVBAsTBkJyYWlu
czEWMBQGA1UEChMNRGV2ZWxvcE1lbnRvcjERMA8GA1UEBxMIVG9ycmFuY2UxEzAR
BgNVBAgTCkNhbGlmb3JuaWExCzAJBgNVBAYTAlVTMIGfMA0GCSqGSIb3DQEBAQUA
<...>
-----END X509 CRL-----

Example

HexAddress
C#
0000  3a 20 63 65 72 74 6c 69  62 5c 6c 64 61 70 2e 63
0010  70 70 28 32 31 33 31 29  3a 20 6c 64 61 70 65 72
<...>

Example

HexAsciiAddress
C#
0000  3a 20 63 65 72 74 6c 69  62 5c 6c 64 61 70 2e 63   : certlib\ldap.c
0010  70 70 28 32 31 33 31 29  3a 20 6c 64 61 70 65 72   pp(2131): ldaper
<...>

Example

HexRaw
C#
3a20636572746c69625c6c6461702e6370702832313331293a206c6461706572<...>

Members

Base64Header0 Base64, with certificate beginning and ending headers.
Base641 Base64, without headers.
Binary2 Pure binary copy.
Base64RequestHeader3 The string is base64 encoded with beginning and ending certificate request headers.
Hex4 Hexadecimal only format.
HexAscii5 Hexadecimal format with ASCII character display.
Base64Any6 Tries the following, in order:
  • Base64Header
  • Base64
BinaryToString method do not support this flag.
StringAny7 Tries the following, in order:
  • Base64Header
  • Base64
  • Binary
BinaryToString method do not support this flag.
HexAny8
  • HexAddress
  • HexAsciiAddress
  • Hex
  • HexRaw
  • HexAscii
BinaryToString method do not support this flag.
Base64CrlHeader9 Base64, with X.509 certificate revocation list (CRL) beginning and ending headers.
HexAddress10 Hex, with address display.
HexAsciiAddress11 Hex, with ASCII character and address display.
HexRaw12 A raw hexadecimal string.

See Also