Skip to content

Instantly share code, notes, and snippets.

@psrok1
Created May 19, 2017 12:15
Show Gist options
  • Save psrok1/b2778a5929a7ee6ef6bf0eebd856b45e to your computer and use it in GitHub Desktop.
Save psrok1/b2778a5929a7ee6ef6bf0eebd856b45e to your computer and use it in GitHub Desktop.
if ( !fn_CryptDuplicateHash(cryptCtx->hCryptSHA1, 0, 0, &hHash) )
goto ERROR;
memmove(pRequest, req->bufPtr, req->bufLen);
if ( fn_CryptEncrypt(cryptCtx->hCryptAES, hHash, 1, 0, pRequest, &dwRequestLen, dwBufLen) )
{
if ( fn_CryptExportKey(cryptCtx->hCryptAES, cryptCtx->hCryptRSA, 1, CRYPT_OAEP, encKey, &encKeyLen) )
{
memmove(encReq, encKey, 96)
if ( fn_CryptGetHashParam(hHash, HP_HASHVAL, encReq + 96, &shaLen, 0) )
result = 1;
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment