[INC] SHA-1 hashing stocks
1 Attachment(s)
This file provides 2 stock functions to calculate the SHA-1 hash for a given string or file.
SHA-1, the Secure Hashing Algorithm, is used by the Secure Hashing Standard as defined in FIPS PUB 180-1 published April 17, 1995. Since it's very unlikely, that 2 messages will result in the same hash, SHA-1 can be used as a fingerprint for a message. PHP Code:
|
Re: [INC] SHA-1 hashing stocks
Nice :)
|
Re: [INC] SHA-1 hashing stocks
:crab: This doesn't compile anymore :crab:
Code:
new input[1]; |
Re: [INC] SHA-1 hashing stocks
Quote:
|
Re: [INC] SHA-1 hashing stocks
Edit: Sorry, I should have been more specific: I'm trying to call SHA1File..
SourcePawn Compiler 1.5.0-dev C:\Users\ws\Documents\Sourcemod\sourcemod-1.5.0-hg3456-windows\addons\sourcemod\scripting\include\sh a1.inc(75) : error 032: array index out of bounds (variable "input") Code:
new input[1]; Missing semicolon too, :3 What sourcemod compiler are you using? How did this compile? I've tried a number of fixes but the hash is wrong :( |
Re: [INC] SHA-1 hashing stocks
Quote:
PHP Code:
|
Re: [INC] SHA-1 hashing stocks
Quote:
That line should probably read PHP Code:
|
Re: [INC] SHA-1 hashing stocks
The hash won't validate against php's sha1_file() method with that code.
|
Re: [INC] SHA-1 hashing stocks
Quote:
|
Re: [INC] SHA-1 hashing stocks
Thanks, works fast enough for my gamedata files. :)
|
All times are GMT -4. The time now is 13:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.