Decrypts process memory.
Unit
Syntax
ParametersAProtectedData [in] Encrypted data to decrypt.
AProtectedDataSize [in] Size of AProtectedData.
AData [out] Decrypted sensitive data. Can be deleted by FreeMem function (but we recommend to use SecureFree function instead).
ADataSize [out] Size of AData.
AProtectedData [in] Encrypted data to decrypt.
AProtectedData [in, out] On input: encrypted data to decrypt. Must be allocated with AllocMem function. On output: unencrypted sensitive data (size will be different). Can be deleted by EncryptBufferFree or SecureFree functions.
AData [out] Unencrypted sensitive data (size will be different). Delete this data by EncryptBufferFree or SecureFree functions.
Return valueUnencrypted sensitive data (size will be different).
RemarksMemUnprotect function decrypts memory that was encrypted using the MemProtect function.
Using MemProtect and MemUnprotect for password encryption is not secure because the data exists as plaintext in memory before it is encrypted and at any time the caller decrypts it for use.
You must encrypt and decrypt the memory during the same boot session. If the computer is restarted before you call the MemUnprotect function, you will not be able to decrypt the data.
When you have finished using the sensitive information, clear it from memory by calling the FillChar function.
See also
|