WinStd Additional templates and function helpers for Microsoft Windows using Standard C++ classes

Classes | Functions | Variables
Cryptography API

Integrates WinStd classes with Microsoft Cryptography API. More...

## Classes
class | winstd::cert_context
| PCCERT_CONTEXT wrapper class. More...
class | winstd::cert_chain_context
| PCCERT_CHAIN_CONTEXT wrapper class. More...
class | winstd::cert_store
| HCERTSTORE wrapper class. More...
class | winstd::crypt_prov
| HCRYPTPROV wrapper class. More...
class | winstd::crypt_hash
| HCRYPTHASH wrapper class. More...
class | winstd::crypt_key
| HCRYPTKEY wrapper class. More...
class | winstd::data_blob
| DATA_BLOB wrapper class. More...

## Functions
| if (CertGetCertificateContextProperty(pCertContext, dwPropId, buf, &dwSize))
else | if (GetLastError()==ERROR_MORE_DATA)
| if (CryptGetHashParam(hHash, dwParam, buf, &dwSize, dwFlags))
return | CryptGetHashParam (hHash, dwParam,(BYTE *)&data, &dwSize, dwFlags)
| if (CryptGetKeyParam(hKey, dwParam, buf, &dwSize, dwFlags))
| if (CryptExportKey(hKey, hExpKey, dwBlobType, dwFlags, NULL, &dwKeyBLOBSize))
| if (dwBufLen)
else | if (CryptEncrypt(hKey, NULL, Final, dwFlags, NULL, &dwEncLen, 0))
| if (dwResult==ERROR_MORE_DATA)
| if (CryptDecrypt(hKey, hHash, Final, dwFlags,(BYTE *) aData.data(), &dwDataLen))

## Variables
static _In_ DWORD | dwPropId
static _In_ DWORD _Out_ std::vector< _Ty, _Ax > & | aData
DWORD | dwSize = WINSTD_STACK_BUFFER_BYTES
return | FALSE
static _In_ DWORD | dwParam
static _In_ DWORD _Out_ std::vector< _Ty, _Ax > _In_ DWORD | dwFlags
static _In_ DWORD _Out_ T & | data
static _In_ HCRYPTKEY | hExpKey
static _In_ HCRYPTKEY _In_ DWORD | dwBlobType
static _In_opt_ HCRYPTHASH | hHash
static _In_opt_ HCRYPTHASH _In_ BOOL | Final
else | dwResult = GetLastError()
| else

## Detailed Description

Integrates WinStd classes with Microsoft Cryptography API.

## Variable Documentation

## ◆ aData

static _In_opt_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_ std::vector< _Ty, _Ax > & aData

Initial value:
{
BYTE buf[WINSTD_STACK_BUFFER_BYTES]
WINSTD_STACK_BUFFER_BYTES
#define WINSTD_STACK_BUFFER_BYTES
Size of the stack buffer in bytes used for initial system function call.
Definition: Common.h:80

## ◆ dwFlags

static _In_ DWORD dwFlags

Initial value:
{
BYTE buf[WINSTD_STACK_BUFFER_BYTES]

## ◆ else

else

Initial value:
{
aData.resize((dwDataLen + sizeof(_Ty) - 1) / sizeof(_Ty))