win32crypt.CryptDecodeMessage
dict = CryptDecodeMessage(EncodedBlob, DecryptPara , VerifyPara , MsgTypeFlags , SignerIndex , PrevInnerContentType , ReturnData )
Decodes and decrypts a message, and verifies its signatures
Parameters
Comments
Only one level of encoding is interpreted. Some types of messages will need multiple calls to completely decode. For example, to decode a message created by win32crypt::CryptSignAndEncryptMessage, one pass with CMSG_ENVELOPED_FLAG and a second pass using CMSG_SIGNED_FLAG are required to recover the original message text.
Return Value
Output params are returned as a dict containing:{MsgType:int}, ##Type of message decoded, one of CMSG_DATA,CMSG_SIGNED,CMSG_ENVELOPED,CMSG_SIGNED_AND_ENVELOPED,CMSG_HASHED
InnerContentType:int, ##Type of decoded content returned, uses same set of values as MsgType. CMSG_DATA indicates unencoded data.
Decoded:str, ##The decoded data, will be None if ReturnData is False.
XchgCert:PyCERT_CONTEXT, ##Certificate used to decode message
SignerCert:PyCERT_CONTEXT} ##Certificate used to sign message