Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
cyrille is currently offline  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
while(length >= 64)
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.
Re: bug: in Crypto/Sha1 [message #11130 is a reply to message #11126] Tue, 21 August 2007 13:45 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thank you, patch applied.

Mirek
Previous Topic: howto access SVN please?
Next Topic: Add capability to Log into Windows console
Goto Forum:
  


Current Time: Thu Mar 28 16:49:29 CET 2024

Total time taken to generate the page: 0.01284 seconds