Decode Hashed Data

The following two procedures allow you to decode and then verify hashed data.

    To decode hashed data
  1. Get a pointer to the encoded blob.
  2. Call CryptMsgOpenToDecode, passing the necessary arguments.
  3. Call CryptMsgUpdate once, passing in the handle retrieved in step 2, and a pointer to the data that is to be decoded. This causes the appropriate actions to be taken on the message, depending on the message type.
  4. Call CryptMsgGetParam, passing in the handle retrieved in step 2, and the appropriate parameter types to access the desired, decoded data. For example, pass in CMSG_CONTENT_PARAM to get a pointer to the decoded content.
    To verify the hash
  1. Call CryptMsgControl, passing in CMSG_CTRL_VERIFY_HASH to verify the hashes.
  2. Call CryptMsgClose to close the message.