crypt32 topic

Cryptographic API

Application programming interface that enables application developers to add authentication, encoding, and encryption to Windows-based applications.

Functions

CryptProtectData(Pointer<CRYPT_INTEGER_BLOB> pDataIn, Pointer<Utf16> szDataDescr, Pointer<CRYPT_INTEGER_BLOB> pOptionalEntropy, Pointer<NativeType> pvReserved, Pointer<CRYPTPROTECT_PROMPTSTRUCT> pPromptStruct, int dwFlags, Pointer<CRYPT_INTEGER_BLOB> pDataOut) int crypt32
The CryptProtectData function performs encryption on the data in a DATA_BLOB structure. Typically, only a user with the same logon credential as the user who encrypted the data can decrypt the data. In addition, the encryption and decryption usually must be done on the same computer.
CryptProtectMemory(Pointer<NativeType> pDataIn, int cbDataIn, int dwFlags) int 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.
CryptUnprotectData(Pointer<CRYPT_INTEGER_BLOB> pDataIn, Pointer<Pointer<Utf16>> ppszDataDescr, Pointer<CRYPT_INTEGER_BLOB> pOptionalEntropy, Pointer<NativeType> pvReserved, Pointer<CRYPTPROTECT_PROMPTSTRUCT> pPromptStruct, int dwFlags, Pointer<CRYPT_INTEGER_BLOB> pDataOut) int crypt32
The CryptUnprotectData function decrypts and does an integrity check of the data in a DATA_BLOB structure. Usually, the only user who can decrypt the data is a user with the same logon credentials as the user who encrypted the data. In addition, the encryption and decryption must be done on the same computer.
CryptUnprotectMemory(Pointer<NativeType> pDataIn, int cbDataIn, int dwFlags) int crypt32
The CryptUnprotectMemory function decrypts memory that was encrypted using the CryptProtectMemory function.
CryptUpdateProtectedState(Pointer<NativeType> pOldSid, Pointer<Utf16> pwszOldPassword, int dwFlags, Pointer<Uint32> pdwSuccessCount, Pointer<Uint32> pdwFailureCount) int crypt32
The CryptUpdateProtectedState function migrates the current user's master keys after the user's security identifier (SID) has changed. This function can be used to preserve encrypted data after a user has been moved from one domain to another.