VerifyHash

Verifies a signature against a hash using Public-Key Cryptography Standards (PKCS1) padding.

HRESULT
__stdcall VerifyHash(
                         __in PINFORMATIONCARD_CRYPTO_HANDLE hCrypto,
                         __in DWORD                cbHash,
                         __in_bcount( cbHash ) BYTE*  pHash,
                         __in LPCWSTR                 hashAlgOid,
                         __in DWORD                   cbSig,
                         __in_bcount( cbSig ) BYTE*   pSig,
                         __out BOOL*                  pfVerified );

Parameters

Parameter Description

hCrypto

Handle to the cryptography object associated with a previously released security token.

cbHash

The length, in bytes, for both the input and output buffers.

pHash

The data to be decrypted.

hashAlgOid

The string OID that identifies the hash algorithm used to produce the data to be decrypted in pHash. Supported values are the OIDs for MD5 and SHA1.

cbSig

The length of the signature to verify.

pSig

A pointer to a buffer that contains the signature to verify.

pfVerified

On return, contains true if the signature matches the hash; otherwise, false.

Property Value/Return Value

HRESULT: If any of the parameters are NULL or 0, E_INVALIDARG is returned.

Requirements

Windows Vista

Header: Declared in infocard.h.

Library: Use infocardapi.lib.

See Also

Reference

SignHash

Concepts

HRESULTS Returned

Copyright © 2007 by Microsoft Corporation. All rights reserved.