The hash value is a raw byte array, not a string. You cannot directly put it in a CString, you have to encode it first. For that, you can use any binary encoder (for instance, Xceed Binary Encoding Library). In the MFC MemoryEncrypt sample installed with the product, we do something similar with the result of an encryption. If you look at the CMemoryEncryptDlg::OnCmdEncrypt() method, you'll see that we use a local function to encode in Hexadecimal (BinaryToHex) and put the result in a CString.
André
Software Developer and Tech Support
Xceed Software Inc.