SA-MP Forums Archive
[Plugin] SHA512 - 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] SHA512 (/showthread.php?tid=188734)

Pages: 1 2 3


SHA512 - RyDeR` - 08.11.2010

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/scripts/ShowCode.asp?txtCodeId=12669&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


Re: SHA1 - Moglizorz. - 08.11.2010

FANTASTIC. Could that have been any better timing?

Any idea when Linux .so plugin will be uploaded?


Re: SHA1 - RyDeR` - 08.11.2010

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


Re: SHA1 - Burridge - 08.11.2010

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


Re: SHA1 - RyDeR` - 08.11.2010

<Deleted>


Re: SHA1 - WillyP - 08.11.2010

Very nice!


Respuesta: SHA1 - anonymousx - 08.11.2010

Yeah, nice plugin very useful. Thx


Re: SHA1 - bigcomfycouch - 08.11.2010

I compiled it for Linux quickly.

http://solidfiles.com/d/a1a4/


Re: SHA1 - Burridge - 08.11.2010

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.


Re: SHA1 - MrDeath537 - 09.11.2010

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

Very nice


Re: SHA1 - Retardedwolf - 09.11.2010

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

Very nice
Dual hash


Re: SHA1 - RyDeR` - 09.11.2010

@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.


AW: SHA1 - Extremo - 09.11.2010

And secure data... is secure data.


Re: SHA1 - Zh3r0 - 09.11.2010

****** is having a point.


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


Re: SHA1 - [H]265 - 09.11.2010

Nice work


Re: SHA1 - Brian_Furious - 09.11.2010

I didnt unsterdand this plugin fuctions


Respuesta: SHA1 - MrDeath537 - 09.11.2010

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.


Re: SHA1 - RyDeR` - 09.11.2010

@ ******:
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.


Re: SHA1 - HyperZ - 09.11.2010

Awesome work


Re: SHA1 - Brian_Furious - 09.11.2010

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.