View Single Post
AI_
Member
Join Date: Oct 2014
Location: Canada
Old 10-26-2016 , 04:30   Re: [INC] SHA-1 hashing stocks
Reply With Quote #11

This actually generates a small error in the hex string (without cascading) for a few of my files, which usually involves outputting fewer than 40 characters, I narrowed it down to the transcription part of the code:

PHP Code:
SHA1Finalize(Context[SHA1Context], String:output[], bool:bHex)
{
    if(
bHex)
    {
        for(new 
i=0;i<5;i++)
            
// Originally: Format(output, 41, "%s%x", output, Context[Message_Digest][i]);
            
Format(output41"%s%08x"outputContext[Message_Digest][i]);
... 
Attached Files
File Type: inc sha1.inc (8.4 KB, 252 views)

Last edited by AI_; 10-26-2016 at 04:32.
AI_ is offline