WINDOW CRYPTAPI partial function declaration [Chinese]

xiaoxiao2021-03-06  42

WINDOW CRYPTAPI partial function declaration [Chinese]

// Get the public key of the key exchange pair BOOLWINAPI CRYPTGETUSERKEY (HcryptProv HPROV, // Get the CSP handle DWORD dWKEYSPEC, // key pair type hcryptkey * phuserkey // Return key handle); // Generate a session key .Bool WinAPI CryptGenkey (HcryptProv HPROV, // CSP Handle ALG_ID ALGID, // Key Pair Types DWORD DWFLAGS, // Key Type HcryptKey * Phkey // Create Successfully Return New Created Key Pair Handle); // Put the session Key Output to Joint Code BOOL WINAPI CRYPTEXPORTKEY (HcryptKey HKey, // Need to be exported key handle HCryptKey HEXPKEY, / / ​​Used to encrypt the key handle of DWORD dwblobtype, // exported key type, For example, the public key or the private key, etc. DWORD DWFLAGS, / / ​​flag bit Byte * pbdata, // save the exported data, if null, PDWDATALEN will return the length of the export data DWORD * PDWDATALEN // Enter the size of the PBDATA buffer, output export Data length); // From the hidden code guide Session Key BOOL WINAPI CRYPTIMPORTKEY (HcryptProv HPROV, / / ​​CSP handle Byte * pbdata, // To import key data DWord dwdatalen, // data length HcryptKey Hpubkey, // If the data is encrypted here to enter the decrypted key handle DWORD DWFLAGS, / / ​​flag bit HcryptKey * phkey // returned to the key handle); // Create HashBool WinAPI Cryptcreatehash (HcryptProv HPROV, // CSP Handle ALG_ID Algid, // Select the Hash algorithm, such as the HcryptKey HKEY, / / ​​HMAC, and Mac algorithm of CALG_MD5. DWORD dwflags, // Reserved, incoming 0, hcrypthash * phhash // Return to Hash handle); // Hash specified data BOOL WINAPI CRYPTHASHDATA (Hcrypthash Hhash, // Hash object Byte * Pbdata, // Data Data Data DWORD DWDATALEN, / / ​​Data length DWORD DWFLAGS // Microsoft's CSP This value will be ignored); // Take Hash Data Bool WinAPI CryptgetHashparam (Hcrypthash Hhash, // Hash Object DWord dwparam, // Take Hash Data Type BYTE * PBDATA , // is affected by DWParam, output buffer DWORD * PDWDATALEN, / / ​​buffer size DWORD dwflags); // acquire or create CSP, password container BOOL WINAPI CRYPTACQUIRECONTEXT (HcryptProv * phprov, // Return CSP handle LPCTSTR PSZCONTAINER, / / Password container name LPCTSTSTSTSTSTSTSTSTSTSTSTSZZPROVIDER, // NULL Use the default CSP name (Microsoft RSA Base Provider) DWord dWPROVTYPE, / / ​​CSP Type DWORD DWFLAGS // ID,

转载请注明原文地址:https://www.9cbs.com/read-55854.html

New Post(0)