Bug fixes in hash algorithm, parameters, and time lock support

This commit is contained in:
miketout
2018-04-28 15:05:20 -07:00
parent c71dcc712e
commit a0dd01bc50
8 changed files with 68 additions and 31 deletions

View File

@@ -49,7 +49,7 @@ CVerusHash &CVerusHash::Write(const unsigned char *data, size_t len)
unsigned char *tmp;
// digest up to 32 bytes at a time
for ( int pos = 0; pos < len; pos += 32)
for ( int pos = 0; pos < len; )
{
int room = 32 - curPos;
@@ -66,7 +66,7 @@ CVerusHash &CVerusHash::Write(const unsigned char *data, size_t len)
else
{
memcpy(curBuf + 32 + curPos, data + pos, len - pos);
curPos = 32 - (len - pos);
curPos += len - pos;
pos = len;
}
}