win32crypt.CryptEncodeObjectEx

str = CryptEncodeObjectEx(StructType, StructInfo , Flags , CertEncodingType , EncodePara )

Serializes and ASN encodes cryptographic structures

Parameters

StructType : str/int

OID identifying type of data to be encoded, either szOID_* string or a numeric id

StructInfo : dict

Information to be encoded. Contents of dict are dependent on StructType

Flags=0 : int

Encoding options, combination of CRYPT_UNICODE_* constants. CRYPT_ENCODE_ALLOC_FLAG is added to flags..

CertEncodingType=X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING : int

Encoding types

EncodePara=None : object

Not supported, use only None

StructType Type of input


szOID_ENHANCED_KEY_USAGEPyCTL_USAGE (sequence of OID's)
X509_ENHANCED_KEY_USAGEPyCTL_USAGE (sequence of OID's)
szOID_KEY_USAGEPyCRYPT_BIT_BLOB
X509_KEY_USAGEPyCRYPT_BIT_BLOB
X509_BITSPyCRYPT_BIT_BLOB