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 previous 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.
 
Read Message
Read Message
Previous Topic: howto access SVN please?
Next Topic: Add capability to Log into Windows console
Goto Forum:
  


Current Time: Sun Apr 28 02:57:10 CEST 2024

Total time taken to generate the page: 0.02693 seconds