CryptProtectMemory function crypt32
The CryptProtectMemory function encrypts memory to prevent others from viewing sensitive information in your process. For example, use the CryptProtectMemory function to encrypt memory that contains a password. Encrypting the password prevents others from viewing it when the process is paged out to the swap file. Otherwise, the password is in plaintext and viewable by others.
BOOL CryptProtectMemory(
[in, out] LPVOID pDataIn,
[in] DWORD cbDataIn,
[in] DWORD dwFlags
);
Implementation
int CryptProtectMemory(Pointer pDataIn, int cbDataIn, int dwFlags) =>
_CryptProtectMemory(pDataIn, cbDataIn, dwFlags);