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. This enumeration value is identical to PemCert value.
Base641 Base64, without headers.
Binary2 Pure binary copy.
Base64RequestHeader3 The string is base64 encoded with beginning and ending certificate request headers. This enumeration value is identical to PemNewReq value.
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.
PemCert21 Base64, with trusted certificate beginning and ending headers. This enumeration value is identical to Base64Header value.
PemTrustedCert22 Base64, with trusted certificate beginning and ending headers.
PemNewReq23 Base64, with new certificate request beginning and ending headers. This enumeration value is identical to Base64RequestHeader value.
PemReq24 Base64, with certificate request beginning and ending headers.
PemEvpPrivateKey26 Base64, with envelope (EnVeloPe) beginning and ending headers.
PemPublicKey27 Base64, with public key beginning and ending headers.
PemRsaPrivateKey28 Base64, with RSA private key beginning and ending headers.
PemRsaPublicKey29 Base64, with RSA public key beginning and ending headers.
PemDsaPrivateKey30 Base64, with DSA private key beginning and ending headers.
PemDsaPublicKey31 Base64, with DSA public key beginning and ending headers.
PemPkcs732 Base64, with PKCS#7 beginning and ending headers.
PemPkcs7Signed33 Base64, with signed PKCS#7 public key beginning and ending headers.
PemPkcs8Encrypted34 Base64, with encrypted PKCS#8 private key beginning and ending headers.
PemPkcs8Inf35 Base64, with unencrypted PKCS#8 private key beginning and ending headers.
PemDHParams36 Base64, with Diffie-Hellman (DH) parameters beginning and ending headers.
PemDHXParams37 Base64, with X9.42 Diffie-Hellman (DH) beginning and ending headers.
PemSSLSessionParams38 Base64, with SSL session parameters beginning and ending headers.
PemDsaParams38 Base64, with DSA parameters beginning and ending headers.
PemECDsaPublicKey40 Base64, with ECDSA public key beginning and ending headers.
PemECParams41 Base64, with EC parameters beginning and ending headers.
PemECPrivateKey42 Base64, with ECDSA private key beginning and ending headers.
PemParams43 Base64, with parameters beginning and ending headers.
PemCms44 Base64, with cryptographic message syntax (CMS) beginning and ending headers.

See Also