[Plugin] Whirlpool plugin
#1

Whirlpool Plugin for SA-MP
This is a whirlpool plugin for usage within SA-MP. This was originally created by ******, this is merely a repost with updated links and some things moved around. The script doesn't contain an include, the following native should be added manually to your script (or go nuts and make a seperate one line include for it):
pawn Код:
native WP_Hash(buffer[], len, const str[]);
__________________________________________________ ________
Whirlpool

Introduction

Very simple plugin. Just provides an implementation of the whirlpool hash algorithm for PAWN. This is so that you don't need to use bad hash systems like MD5, plain awful ones like Adler32 (UDB_Hash) or ones that aren't even true hashes (encode).

Unlike most other hash functions (MD5 and SHA1 included) there are no known weaknesses in whirlpool, so you can be sure your hashes are secure.

Use

This plugin adds just one function:

pawn Код:
native WP_Hash(buffer[], len, const str[]);
So I didn't bother including an include. To use simply call the function, passing a buffer of at least 129 characters, the size of that buffer and the string you want to hash. This used to say 145 but I have no idea why! You need 128 for the hash and 1 for the NULL terminator

Example
pawn Код:
#include <a_samp>

native WP_Hash(buffer[], len, const str[]);

main()
{
    new
        buf[129];
    printf("hash");
    WP_Hash(buf, sizeof (buf), "The quick brown fox jumps over the lazy dog");
    print(buf);
}
That will output:

Код:
B97DE512E91E3828B40D2B0FDCE9CEB3C4A71F9BEA8D88E75C4FA854DF36725FD2B52EB6544EDCACD6F8BEDDFEA403CB55AE31F03AD62A5EF54E42EE82C3FB35
Which is the correct hash for that string.

Notes

If you use YSI that uses a custom key-based hash algorithm, while there are currently no known cracks for it I do not know exactly how secure it is, however the key system vastly improves it's security from server to server. You may want to consider upgrading to Whirlpool however YSI is the only user system which actually bothered with anything resembling security, so it's not required.

As with all my plugins if you place the folder in your SA:MP directory then compiling the plugin will automatically place the new dll or so in your plugins directory.

Reference

http://en.wikipedia.org/wiki/Whirlpool_(cryptography)

Download
  • Source and windows .dll


https://github.com/Southclaws/samp-whirlpool/releases4


(Note: These links no longer work. See above.)
http://dl.dropbox.com/u/21683085/Whirlpool.rar

http://www.y-less.com/YSI/Whirlpool.rar
  • 32 bit linux .so


http://dl.dropbox.com/u/18253648/Whirlpool.so (thanks linuxthefish)
http://www.solidfiles.com/d/1fbbc8fcab/ (thanks pyrodave)
http://www.kowaz.hu/downloads/Whirlpool.so (May be dead)
http://files.uploadffs.com/3/2b87364d/Whirlpool.so (May be dead)
http://www.megaupload.com/?d=89KU5FCG (May be dead)
  • 64-bit linux .so


http://www.solidfiles.com/d/688303825c/ (thanks Mark™)

Version

I have no intention of modifying this in any way as it works fine. So as far as I'm concerned this is 1.0.

License

* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Beyond that do what you like with it.
Reply


Messages In This Thread
Whirlpool plugin - by Abagail - 14.04.2015, 20:48
Re: Whirlpool plugin - by Jakwob - 14.04.2015, 20:53
Re: Whirlpool plugin - by Evocator - 14.04.2015, 20:54
Re: Whirlpool plugin - by Abagail - 14.04.2015, 20:56
Re: Whirlpool plugin - by Abagail - 24.04.2015, 15:04
Re: Whirlpool plugin - by KayJ - 24.04.2015, 15:08
Re: Whirlpool plugin - by Abagail - 24.04.2015, 15:50
Re: Whirlpool plugin - by vannesenn - 01.07.2016, 21:04
Re: Whirlpool plugin - by SickAttack - 01.07.2016, 21:22
Re: Whirlpool plugin - by vannesenn - 01.07.2016, 23:20

Forum Jump:


Users browsing this thread: 1 Guest(s)