Home » U++ Library support » U++ Library : Other (not classified elsewhere) » bug: in Crypto/Sha1
bug: in Crypto/Sha1 [message #11126] |
Mon, 20 August 2007 23:58  |
cyrille
Messages: 1 Registered: August 2007 Location: France
|
Junior Member |
|
|
Hello,
I found a bug in Crypo/Sha1::Put() function.
You don't have the same hash if you put all your buffer in one call or if you put the last 1 to 63 bytes in another call.
The line code should be while((pos+length) >= 64) , and the last lines memcpy(buffer, s, length);
pos = length; should be memcpy(buffer+pos, s, length);
pos += length; .
Regards.
|
|
|
Goto Forum:
Current Time: Sun Apr 27 17:01:02 CEST 2025
Total time taken to generate the page: 0.01059 seconds
|