To verify a signature, a hash object must first be created by using the CryptCreateHash function. This hash object will accumulate the data to be verified. The data is then added to the hash object with the CryptHashData function.
After the last block of data is added to the hash, the CryptVerifySignature function is used to verify the signature. The signature data, a handle to the hash object, and the description string must all be supplied to CryptVerifySignature. A handle to the key pair that was used to sign the data must also be specified.
After the signature has been verified (or has failed the verification) the hash object should be destroyed with the CryptDestroyHash function.