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



Encrypt - Fro1sha - 05.06.2010

Author:
Fro aka Fro1sha

Description:
Allows you to encrypt any text, file (_file).
Create a unique key (_hmac).

Dimension hash:
sha1 - 41
sha2(224, 256) - 65
sha2(384, 512) - 129
md5 - 33


Copyright © 2010 Fro <TBG>

Credit http://xyssl.sourcearchive.com/docum....9-2/main.html


Functions:
Encrypt Win+Unix
Source

P.S. On Linux it was not possible to check


Re: [REL] Encrypt - king s dm - 05.06.2010

Amazing work dude, but I'm still going to use Whirlpool


Re: [REL] Encrypt - Woet - 05.06.2010

It's hash, not hesh.


Re: [REL] Encrypt - Fro1sha - 05.06.2010

Quote:
Originally Posted by Woet
It's hash, not hesh.
ok, sorry


Re: [REL] Encrypt - [LDT]LuxurY - 06.07.2010

nice one!

Quote:
Originally Posted by king s dm
Посмотреть сообщение
Amazing work dude, but I'm still going to use Whirlpool
agree with you dude


Re: [REL] Encrypt - JernejL - 31.07.2010

solidfiles link has died, does anyone have a copy of this?

edit: nevermind, it seems to work for everyone but me :/


[REL] Encrypt - [NoV]LaZ - 31.07.2010

Quote:
Originally Posted by JernejL
Посмотреть сообщение
solidfiles link has died, does anyone have a copy of this?
The link works just fine for me; I've attached the .rar archive to this post.
________
Bdsm Movies


Re: [REL] Encrypt - JernejL - 09.12.2010

I use this plugin, it's great, but i wish it had more options - for example a simple native 32 bit crc or adler would be a good addition - it's not powerful, but it would be a fair bit faster than doing it in pawn and useful to detect spammers repeating same chat lines - by just a plugin-lightspeed crc check.


Re: [REL] Encrypt - legodude - 30.12.2010

indeed jernejl.

i still prefer adler to that indeed.


Re: [REL] Encrypt - FreshDoubleX - 30.12.2010

Awesome dude, but I still prefer Whirlpool !
Nice job !


Re: [REL] Encrypt - Matthewjames1 - 12.05.2011

Nice job, and you retards who keep saying "Nice job, I still prefer Whirlpool ." think if somone on your thread said "Nice, but I still prefer someone elses script"


AW: [REL] Encrypt - The_Godboy - 19.05.2011

Please make ones for linux.. thats importent for me


Re : [REL] Encrypt - human-product - 23.09.2011

Thanks!!


Re: [REL] Encrypt - GangsTa_ - 23.09.2011

Whirlpool is good too.. Good choice with MD5.


Re : [REL] Encrypt - TheBest6 - 07.10.2011

Nice


Re: [REL] Encrypt - Stylock - 08.08.2013

There's a bug when I try to use sha2_hmac:
Код:
Erorr native function sha2_file: Expecting 3 parameter(s), but found 4
I think it's most definitely related to this piece of code:
Код:
AMX_NATIVE_INFO
    Encrypt_natives[] =
{
    { "sha1", n_sha1 },
    { "sha1_file", n_sha1_file },
    { "sha1_hmac", n_sha1_hmac },
    { "sha2", n_sha2 },
    { "sha2_file", n_sha2_file },
    { "sha2_hmac", n_sha2_file },
    { "md5", n_md5 },
    { "md5_file", n_md5_file },
    { "md5_hmac", n_md5_hmac },
    { 0, 0 }
};
Can you/someone fix it? I tried to compile it with code::blocks, but failed.


AW: Re: [REL] Encrypt - Mellnik - 08.08.2013

Quote:
Originally Posted by Stylock
Посмотреть сообщение
There's a bug when I try to use sha2_hmac:
Код:
Erorr native function sha2_file: Expecting 3 parameter(s), but found 4
I think it's most definitely related to this piece of code:
Код:
AMX_NATIVE_INFO
    Encrypt_natives[] =
{
    { "sha1", n_sha1 },
    { "sha1_file", n_sha1_file },
    { "sha1_hmac", n_sha1_hmac },
    { "sha2", n_sha2 },
    { "sha2_file", n_sha2_file },
    { "sha2_hmac", n_sha2_file },
    { "md5", n_md5 },
    { "md5_file", n_md5_file },
    { "md5_hmac", n_md5_hmac },
    { 0, 0 }
};
Can you/someone fix it? I tried to compile it with code::blocks, but failed.
Use Visual C++ since it is a VisualStudio Project


Re: [REL] Encrypt - DandyCorleone - 04.01.2017

how to connect with website pcp if i wanna login?

example with whirlpool, use wp_hash
PHP код:
<?php
    session_start
();
    include 
"koneksi.php";
    if(isset(
$_SESSION['playername']))
    {
        
go('index.php''You already logged in.');
    }
    if(!isset(
$_POST['username'], $_POST['password']))
    {
        
go('index.php''Please fillout all required forms.');
    }
    else
    {
        
$query $koneksi->prepare("SELECT `adminlevel`,`name` from `players` where `name` = ? and `pass` = ?");
        
$query->execute(array($_POST['username'], strtoupper(hash("whirlpool"$_POST['password']))));
        if(
$query->rowCount() > 0)
        {
            
$data $query->fetch();
            
go('index.php''Succesfully logged in.');
            
$_SESSION['playername'] = $data['name'];
            
$_SESSION['playerlevel'] = $data['adminlevel'];
        }
        else
        {
            
go('index.php''Wrong username or password.');
        }
    }



Re: [REL] Encrypt - BroZeus - 05.01.2017

Quote:
Originally Posted by DandyCorleone
Посмотреть сообщение
how to connect with website pcp if i wanna login?

example with whirlpool, use wp_hash
It depends on which function you are using.
Here is list for in-game function and corresponding php function :

sha1(const text[], hash[]) - hash("sha1", $password)
sha2(const text[], hash[]) - hash("sha256", $password)
md5(const text[], hash[]) - hash("md5", $password) (Not recommended to use this now)

Out of above three hashing algorithms sha2 is most secure BUT now sa-mp has native function for sha-256 hash( https://sampwiki.blast.hk/wiki/SHA256_PassHash ) so if you want to use sha256 use the native function.

However whirlpool is still better than the above hash algorithms.


Respuesta: [REL] Encrypt - DarkChildren - 06.01.2017

Amazing!!!