So, tlas -
What I want to know is: Did you do it on purpose, or were you too busy creating a stream of crapcoins to be careful enough?
elaborate please ...
Let's make it a homework question. Here's the hash code from tlas, stripped down a little. What's the bug?
SHA256((pbegin == pend ? pblank : (unsigned char*)&pbegin[0]), (pend - pbegin) * sizeof(pbegin[0]), (unsigned char*)&hash1);
BitSequence hashval[32];
Hasht1( 256, (const unsigned char*)hash1.ToString().c_str(),256, hashval );
uint256 hash2;
SHA256((unsigned char*)&hashval, sizeof(hashval), (unsigned char*)&hash2);
return hash2;
Hint - here's the function prototype for Hasht1. Following the NIST standard API, all lengths are in bits:
HashReturn Hasht1(int hashbitlen, const BitSequence *data,
DataLength databitlen, BitSequence *hashval);