[Plugin] Hash/HMAC plugin
#1

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
  • 12.3.2011: Again tweaked hex string function for some speed gain
  • 11.3.2011: Modified hex string function to more proper code style (old was able to cause crash, also now using alloca by default)
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
Reply
#2

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

im gonna use this
Reply
#3

Cool Nice WOrk
Reply
#4

Nice Job.
Reply
#5

1st post

Wow Really Cool Good Job
Reply
#6

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

Nice work!
Reply
#8

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

Nice work, but i still prefering Whirlpool.
Reply
#10

Good Job Man. Im Gonna Use This
Reply
#11

Wow nice work
Reply
#12

Very nice. But still, I guess Whirlpool is better.
Reply
#13

You can use also whirlpool algorithm with this
Reply
#14

Nice work. But i will still use Whirpool
Reply
#15

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

wow cool. Good Job!
Reply
#17

AES (and maybe others) encryption coming soon.
Reply
#18

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

Awesome work. I already running this plugin.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)