SA-MP Forums Archive
[Plugin] Hash/HMAC plugin - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] Hash/HMAC plugin (/showthread.php?tid=237943)



Hash/HMAC plugin (0.2) - Teprey - 10.03.2011

HASH plugin (v0.2)

I have decided to release my all-in-one Hashing and HMAC:ing solution.

It uses OpenSSL as cryptographic library.
It provides two new native functions:


native hhash(algid, input[], buffer[], buflen);

For calculating message digest (hash)


native hhash_hmac(algid, input[], key[], buffer[], buflen);

For calculating Hash based message authentication code (HMAC)

It has currently support for 6 hashing algorithms:
MD5, SHA-1, SHA-256, SHA-512, RIPEMD-160 and Whirlpool.
All of these algorithms can also be used in HMAC mode.


Example
pawn Код:
new str[H_MD5_LEN];
hhash(H_MD5, "The quick brown fox jumps over the lazy dog", str, H_MD5_LEN);
printf(str);
outputs "9e107d9d372bb6826bd81d3542a419d6" which is correct MD5 hex string hash for that string

Updates Download
README contains essential information

ATTENTION! Currently compiled linux binary has whirlpool hash disabled because I wasnt able to install correct OpenSSL version with Whirlpool support into my compile machine. You can enable whirlpool support if you have correct OpenSSL by removing "#define HASH_WHIRLPOOL_ENABLED" line from "hash.cpp" and compiling again.

DOWNLOAD SOURCE + WINDOWS DLL + LINUX BINARY


Re: Hash/HMAC plugin - SlashPT - 11.03.2011

quite nice work , for who wants all the hashing algorythms :3

im gonna use this


Re: Hash/HMAC plugin - Roomeo - 11.03.2011

Cool Nice WOrk


Re: Hash/HMAC plugin - HyperZ - 11.03.2011

Nice Job.


Re: Hash/HMAC plugin - wheelman_WM - 11.03.2011

1st post

Wow Really Cool Good Job


Re: Hash/HMAC plugin - Teprey - 11.03.2011

Update:
Added Linux binary (32-bit, compiled with Debian lenny in virtual machine) (Whirlpool disabled)


Re: Hash/HMAC plugin - Ricop522 - 11.03.2011

Nice work!


Respuesta: Hash/HMAC plugin - Code8976Man - 11.03.2011

Nice, just i was looking for this. I'll use it.


Re: Hash/HMAC plugin - Anker_by - 12.03.2011

Nice work, but i still prefering Whirlpool.


Re: Hash/HMAC plugin - Venice - 12.03.2011

Good Job Man. Im Gonna Use This


Re: Hash/HMAC plugin - Ironboy - 20.03.2011

Wow nice work


Re: Hash/HMAC plugin - Jochemd - 20.03.2011

Very nice. But still, I guess Whirlpool is better.


Re: Hash/HMAC plugin - Teprey - 20.03.2011

You can use also whirlpool algorithm with this


Re: Hash/HMAC plugin - Medal Of Honor team - 26.03.2011

Nice work. But i will still use Whirpool


Re: Hash/HMAC plugin - [03]Garsino - 30.03.2011

I'm using it. It's nice. Good work!


Re: Hash/HMAC plugin - Abinesh™ - 30.03.2011

wow cool. Good Job!


Re: Hash/HMAC plugin - Teprey - 14.07.2011

AES (and maybe others) encryption coming soon.


Re: Hash/HMAC plugin - Kyosaur - 14.07.2011

Im just laughing at everyone who says whirlpool is better.... they obviously didnt even bother to read the topic.


Re: Hash/HMAC plugin - OUL - 14.07.2011

Awesome work. I already running this plugin.