Raised This Month: $12 Target: $400
 3% 

[INC] SHA-1 hashing stocks


Post New Thread Reply   
 
Thread Tools Display Modes
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, 209 views)

Last edited by AI_; 10-26-2016 at 04:32.
AI_ is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 10-27-2016 , 00:44   Re: [INC] SHA-1 hashing stocks
Reply With Quote #12

Thanks!
__________________
Peace-Maker is offline
ofir753
Senior Member
Join Date: Aug 2012
Old 10-28-2016 , 10:06   Re: [INC] SHA-1 hashing stocks
Reply With Quote #13

Good job!
ofir753 is offline
emsit
Member
Join Date: Apr 2015
Old 06-19-2018 , 02:05   Re: [INC] SHA-1 hashing stocks
Reply With Quote #14

v1.2 Transitional Syntax
Attached Files
File Type: inc sha1.inc (7.5 KB, 196 views)
__________________

emsit is offline
liketask
Junior Member
Join Date: Oct 2017
Location: Vsh_Pumpkin_Fort_V2
Old 04-11-2023 , 12:17   Re: [INC] SHA-1 hashing stocks
Reply With Quote #15

Fixed version for SourceMod 1.11+ (rewrote array-based enum to enum structs)
Attached Files
File Type: inc sha1.inc (7.5 KB, 79 views)
__________________

Last edited by liketask; 04-11-2023 at 12:17.
liketask is online now
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode