Decrypts encrypted data by using RSA cipher.
Unit
Syntax
ParametersAKey [in] A key for decryption. Comes from RSAGenKey function or RSALoadPrivateKey function. A private key will be used.
AEncryptedData [in] A data to decrypt. Must be in little-endian format.
AData [out] A decrypted AEncryptedData's "clear text" data. Must be deleted with FreeMem function (but we recommend to use SecureFree function instead). Will have different size from AData.
ADataSize [in] On input: size of AEncryptedData. On output: size of AData.
AEncryptedData [in] Encrypted data (in string form) to decrypt. Must be in little-endian format.
AInPlaceData [in, out] On input: encrypted buffer to decrypt. Must be in little-endian format. On output: "clear text" buffer (same size).
Return valueDecrypted "clear text" data.
RemarksThis function decrypts data previosly encrypted with RSAEncrypt function with private key of asymmetric RSA cipher. The encrypted data is passed in AEncryptedData parameter. The function outputs decrypted data back to AData parameter. AData expected to have different size from AEncryptedData. In other words, asymmetric decryption with RSA does change the size of the data.
The overload variant with RawByteString decrypts AEncryptedData parameter and outputs decrypted data as function's result.
The overload variant with AInPlaceData decrypts data "in place".
Examples
See also
|