MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / CryptEncryptMessage

Function CryptEncryptMessage

windows/winproxy/apis/crypt32.py:124–130  ·  view source on GitHub ↗
(pEncryptPara, cRecipientCert, rgpRecipientCert, pbToBeEncrypted, cbToBeEncrypted, pbEncryptedBlob, pcbEncryptedBlob)

Source from the content-addressed store, hash-verified

122
123@Crypt32Proxy()
124def CryptEncryptMessage(pEncryptPara, cRecipientCert, rgpRecipientCert, pbToBeEncrypted, cbToBeEncrypted, pbEncryptedBlob, pcbEncryptedBlob):
125 if isinstance(pbToBeEncrypted, windows.pycompat.anybuff):
126 # Transform string to array of byte
127 pbToBeEncrypted = (gdef.BYTE * len(pbToBeEncrypted))(*bytearray(pbToBeEncrypted))
128 if cbToBeEncrypted is None and pbToBeEncrypted is not None:
129 cbToBeEncrypted = len(pbToBeEncrypted)
130 return CryptEncryptMessage.ctypes_function(pEncryptPara, cRecipientCert, rgpRecipientCert, pbToBeEncrypted, cbToBeEncrypted, pbEncryptedBlob, pcbEncryptedBlob)
131
132@Crypt32Proxy()
133def CryptDecryptMessage(pDecryptPara, pbEncryptedBlob, cbEncryptedBlob, pbDecrypted, pcbDecrypted, ppXchgCert):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected