Click or drag to resize

CryptEncoding Enumeration

Note: This API is now obsolete.

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

Namespace:  PKI.ManagedAPI
Assembly:  PKI.Core (in PKI.Core.dll) Version: 3.3.0.0 (3.3.0.0)
Syntax
[ObsoleteAttribute("Use Asn1Parser.EncodingType enum instead.", true)]
public enum CryptEncoding
Members
  Member nameValueDescription
CRYPT_STRING_BASE64HEADER0 Base64, with certificate beginning and ending headers.
CRYPT_STRING_BASE641 Base64, without headers.
CRYPT_STRING_BINARY2 Pure binary copy.
CRYPT_STRING_BASE64REQUESTHEADER3 The string is base64 encoded with beginning and ending certificate request headers.
CRYPT_STRING_HEX4 Hexadecimal only format.
CRYPT_STRING_HEXASCII5 Hexadecimal format with ASCII character display.
CRYPT_STRING_BASE64_ANY6 Tries the following, in order:
  • CRYPT_STRING_BASE64HEADER
  • CRYPT_STRING_BASE64
CryptBinaryToStringCrypt32Managed.CryptBinaryToString method do not support this flag.
CRYPT_STRING_ANY7 Tries the following, in order:
  • CRYPT_STRING_BASE64HEADER
  • CRYPT_STRING_BASE64
  • CRYPT_STRING_BINARY
CryptBinaryToString method do not support this flag.
CRYPT_STRING_HEX_ANY8
  • CRYPT_STRING_HEXADDR
  • CRYPT_STRING_HEXASCIIADDR
  • CRYPT_STRING_HEX
  • CRYPT_STRING_HEXRAW
  • CRYPT_STRING_HEXASCII
CryptBinaryToString method do not support this flag.
CRYPT_STRING_BASE64X509CRLHEADER9 Base64, with X.509 certificate revocation list (CRL) beginning and ending headers.
CRYPT_STRING_HEXADDR10 Hex, with address display.
CRYPT_STRING_HEXASCIIADDR11 Hex, with ASCII character and address display.
CRYPT_STRING_HEXRAW12 A raw hexadecimal string.

Windows Server 2003 and Windows XP: This value is not supported.

CRYPT_STRING_STRICT536870912 Set this flag for Base64 data to specify that the end of the binary data contain only white space and at most three equals "=" signs.

Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: This value is not supported.

Remarks
The following section displays example string formats.
Examples
CRYPT_STRING_BASE64HEADER
-----BEGIN CERTIFICATE-----
MIIEITCCA+CgAwIBAgIUKMmxmDbjbHqt+Yzwj5lflBxuQwEwCQYHKoZIzjgEAzAjMSEwHwYDVQQD
ExhUb2tlbiBTaWduaW5nIFB1YmxpYyBLZXkwHhcNMTIxMTE2MTgzODMwWhcNMTIxMTIzMTgzODMw
WjAtMSswKQYDVQQDHiIAYgBiADEANAAxADkAYQAyAGMAZgBjADEAZQAwADAAOAAAMIGfMA0GCSqG
<...>
-----END CERTIFICATE-----
Examples
CRYPT_STRING_BASE64HEADER
MIIEITCCA+CgAwIBAgIUKMmxmDbjbHqt+Yzwj5lflBxuQwEwCQYHKoZIzjgEAzAjMSEwHwYDVQQD
ExhUb2tlbiBTaWduaW5nIFB1YmxpYyBLZXkwHhcNMTIxMTE2MTgzODMwWhcNMTIxMTIzMTgzODMw
WjAtMSswKQYDVQQDHiIAYgBiADEANAAxADkAYQAyAGMAZgBjADEAZQAwADAAOAAAMIGfMA0GCSqG
<...>
Examples
CRYPT_STRING_BASE64REQUESTHEADER
-----BEGIN NEW CERTIFICATE REQUEST-----
MIIDBjCCAm8CAQAwcTERMA8GA1UEAxMIcXV1eC5jb20xDzANBgNVBAsTBkJyYWlu
czEWMBQGA1UEChMNRGV2ZWxvcE1lbnRvcjERMA8GA1UEBxMIVG9ycmFuY2UxEzAR
BgNVBAgTCkNhbGlmb3JuaWExCzAJBgNVBAYTAlVTMIGfMA0GCSqGSIb3DQEBAQUA
<...>
-----END NEW CERTIFICATE REQUEST-----
Examples
CRYPT_STRING_HEX
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
<...>
Examples
CRYPT_STRING_HEXASCII
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
<...>
Examples
CRYPT_STRING_BASE64X509CRLHEADER
-----BEGIN X509 CRL-----
MIIDBjCCAm8CAQAwcTERMA8GA1UEAxMIcXV1eC5jb20xDzANBgNVBAsTBkJyYWlu
czEWMBQGA1UEChMNRGV2ZWxvcE1lbnRvcjERMA8GA1UEBxMIVG9ycmFuY2UxEzAR
BgNVBAgTCkNhbGlmb3JuaWExCzAJBgNVBAYTAlVTMIGfMA0GCSqGSIb3DQEBAQUA
<...>
-----END X509 CRL-----
Examples
CRYPT_STRING_HEXADDR
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
<...>
Examples
CRYPT_STRING_HEXASCIIADDR
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
<...>
Examples
CRYPT_STRING_HEXRAW
3a20636572746c69625c6c6461702e6370702832313331293a206c6461706572<...>
See Also