25 Apr 2012 08:46
RIPEMD160 Hash does not agree with other implementations.
c++programmer <hackish <at> gmail.com>
2012-04-25 06:46:37 GMT
2012-04-25 06:46:37 GMT
I ran the following code which was mostly copied from an example on the crypto++ page:
http://www.cryptopp.com/wiki/User_Guide:_cryptlib.h:
string strDigest;
HashFilter hashFilter(RIPEMD160(),new HexEncoder(new StringSink(strDigest),false));
string test="1";
hashFilter.Put((byte const*)test.data(),test.length());
hashFilter.MessageEnd();
cout << "hash is: " << strDigest <<endl;
I get the following:
hash is: b3dbc4177b11959e251e87e7abf8f86eeb3a93b3
Using an online hasher I get:
http://www.fileformat.info/tool/hash.htm?text=1
Which does not agree with the result from crypto++
Can anyone point out what I'm doing wrong?
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
RSS Feed