Table 20.14 lists the CSP functions. You can consider CryptAcquireContext and CryptReleaseContext as two bookend functions that need to go at the start and end, respectively, of the code in your applications that uses any of the crypto API functions. Note that CryptAcquireContext can be called with a NULL value for the CSP, which results in the default CSP for the current user being used.
Table 20.14: Cryptographic Service Provider (CSP) Functions
Function | Description |
CryptAcquireContext | Acquires a handle to the current user’s key container within a particular CSP. |
CryptGetProvParam | Retrieves attributes of a CSP. |
CryptReleaseContext | Releases the handle acquired by CryptAcquireContext. |
CryptSetProvider | Specifies the user default CSP for a particular CSP type. |
CryptSetProvParam | Specifies attributes of a CSP. |