[Plugin] SHA512
#1

Information
Read more information, about SHA512 in Wikipedia.

pawn Код:
/*
    @Release Name: SHA512
    @Release Type: Plugin
    @Author: RyDeR`
    @Update: 10/11/2010 - 14:30
    @Credits: http://www.planetsourcecode.com/vb/scrip...p;lngWId=3
    @Functions:
                @Function: SHA512(const string[], buffer[], len);
                @Info: Obvious.
                @Params:
                        @string[] - The string you want to hash.
                        @buffer[] - String variable to store the hashed data in.
                        @len = Size of buffer.
*/
Function(s)
It has only one function:
pawn Код:
native SHA512(const string[], buffer[], len);
Example(s)
First of all include SHA512 at the top of your script. (Not necessery though, you can also just add the native)

pawn Код:
new
    buffer[128]
;
SHA512("Hello World", buffer, sizeof(buffer));
print(buffer);
Will give us:
Код:
2c74fd17edafd80e8447b0d46741ee243b7eb74dd2149a0ab1b9246fb30382f27e853d8585719e0e67cbda0daa8f51671064615d645ae27acb15bfb1447f459b
which is very secure.

Note
The buffer must have at least 128 as array size.

Download
Windows ~ SHA512 (Plugin (.dll) ; Include ; Source) - Click here to download

Linux (Many thanks to bigcomfycouch) ~ SHA512 (Plugin (.so) ; Include ; Source) - Click here to download
Reply
#2

FANTASTIC. Could that have been any better timing?

Any idea when Linux .so plugin will be uploaded?
Reply
#3

I don't have linux so I'm not able to handle that.
I was wondering if someone could compile it for linux?
Reply
#4

If you can upload the source in a ZIP I can (I'm on my Linux machine right now).
Reply
#5

<Deleted>
Reply
#6

Very nice!
Reply
#7

Yeah, nice plugin very useful. Thx
Reply
#8

I compiled it for Linux quickly.

http://solidfiles.com/d/a1a4/
Reply
#9

Quote:
Originally Posted by bigcomfycouch
Посмотреть сообщение
I compiled it for Linux quickly.

http://solidfiles.com/d/a1a4/
My Linux machine fails, haha.

On a good note; It's cool, RyDeR.
Reply
#10

Nice one Ryder . Now I've got 2 hash plugins, Whirlpool and SHA1, lol xD.

Very nice
Reply
#11

Quote:
Originally Posted by MrDeath
Посмотреть сообщение
Nice one Ryder . Now I've got 2 hash plugins, Whirlpool and SHA1, lol xD.

Very nice
Dual hash
Reply
#12

@bigcomfycouch:
Thanks, I will add it to the first post.
Can you also release the source though?

@Burridge:
You tried at least, thanks for it.

@******:
Yes, thanks, I understand. But this is just SA:MP.
Reply
#13

And secure data... is secure data.
Reply
#14

****** is having a point.


RyDeR good job, finally it was the time for you to release something new.
Reply
#15

Nice work
Reply
#16

I didnt unsterdand this plugin fuctions
Reply
#17

I can't understand how to unhash a function without bruteforce, supposing I've got this 'hash':

pawn Код:
stock
    hash(const string[])
    {
        new
            len,
            pos,
            hashed
            ;

        for (len = strlen(string), pos = 0; pos < len; pos ++)
        {
            hashed += string[pos];
        }

        return 1;
    }
Supposing I hash "ab" (which will give me 195 [98 + 97])
How can you know the password without tryng all combinations?:

X + Y = 195

:\


Sorry if I am doing a stupid question, but I don't understand.
Reply
#18

@ ******:
Agreed - you have a point.

@ Brian_Furious:
It's obvious. Which part don't you understand?

@ MrDeath:
It's not possible (AFAIK) as long you don't save every value of a character to another variable.
You can't just return the characters from a sum of numbers.
Reply
#19

Awesome work
Reply
#20

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
@ ******:
Agreed - you have a point.

@ Brian_Furious:
It's obvious. Which part don't you understand?

@ MrDeath:
It's not possible (AFAIK) as long you don't save every value of a character to another variable.
You can't just return the characters from a sum of numbers.
About the SHA parts

This forum requires that you wait 120 seconds between posts. Please try again in 45 seconds.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)