win32crypt.CryptEncryptMessage

str = CryptEncryptMessage(EncryptPara, RecipientCert , ToBeEncrypted )

Encrypts and encodes a message

Parameters

EncryptPara : PyCRYPT_ENCRYPT_MESSAGE_PARA

Encryption parameters

RecipientCert : (PyCERT_CONTEXT,...)

Sequence of handles to recipients' certificates

ToBeEncrypted : buffer

Data to be encrypted