PAWN Hashing Algorithm
#3

Quote:
Originally Posted by iZN
Посмотреть сообщение
You wanted some hashing algorithm which is written in PAWN and also it needs to be secure. It's not possible, they're decryptable easily. I'd use whirlpool plugin instead instead of writing or searching for some ready made hash algorithm. Anyway, I found some udb hash (it's not secure, but if you still wanted to have the hash, you can use this) I still prefer using the whirlpool hash instead of this.

pawn Код:
// credits to whoever made this
stock udb_hash(buf[], length = sizeof(buf))
{
    new s1 = 1, s2 = 0, n;
    for (n = 0; n < length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1) % 65521;
    }
    return (s2 << 16) + s1;
}
Ahh okay... Thank you anyway, it's a pity to hear that PAWN isn't cryptographically secure. I might try a PHP script over a HTTPS connection but for now I will use the Whirlpool plugin. There's no way in hell I'd ever use Alder32 (udb_hash) or MD5... ^_^
Reply


Messages In This Thread
PAWN Hashing Algorithm - by ROMDash - 07.05.2014, 19:15
Re: PAWN Hashing Algorithm - by iZN - 07.05.2014, 19:32
Re: PAWN Hashing Algorithm - by ROMDash - 07.05.2014, 19:37
Re: PAWN Hashing Algorithm - by Djole1337 - 07.05.2014, 19:54
Re: PAWN Hashing Algorithm - by ROMDash - 07.05.2014, 20:30
Re: PAWN Hashing Algorithm - by Calgon - 08.05.2014, 02:11

Forum Jump:


Users browsing this thread: 1 Guest(s)