[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-cryptoapi
Subject:    Re: CryptoAPI and CAPICOM sha1 values
From:       Daniel Sie <dsie () WINDOWS ! MICROSOFT ! COM>
Date:       2002-10-23 17:07:01
[Download RAW message or body]

CAPICOM hashes the entire BSTR, which is Unicode in this case.

If you want to hash just the ASCII, then you should create a BSTR
containing the ASCII, and in VB you can call StrConv to do that. For
C/C++, all you have to do is call SysAllocStringByteLen().

Thanks.

-----Original Message-----
From: Dean Adams [mailto:da@TRUSTIS.COM]=20
Sent: Tuesday, October 22, 2002 10:55 AM
To: CryptoAPI@DISCUSS.MICROSOFT.COM
Subject: Re: CryptoAPI and CAPICOM sha1 values


Thanks for clearing this up for me Carlos - I'm on Win2K.

By the way Laszlo,
I tried your suggestion regarding printf (or in this case sprintf) and
it gave me the exact same hexascii representation that my original code
did. Makes me wonder whether CAPICOM is doing this coversion right!

Both,
   Thanks for your help.

    Dean

----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html . To unsubscribe,
mailto:CryptoAPI-signoff-request@DISCUSS.MICROSOFT.COM

----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:CryptoAPI-signoff-request@DISCUSS.MICROSOFT.COM
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic