SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 12/05/2011, 01:34 AM   #11
Matthewjames1
Little Clucker
 
Join Date: Apr 2011
Posts: 13
Reputation: 0
Default Re: [REL] Encrypt

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"
Matthewjames1 is offline   Reply With Quote
Old 19/05/2011, 02:41 PM   #12
The_Godboy
Little Clucker
 
Join Date: Jun 2008
Posts: 11
Reputation: 0
Default AW: [REL] Encrypt

Please make ones for linux.. thats importent for me
The_Godboy is offline   Reply With Quote
Old 23/09/2011, 05:34 PM   #13
human-product
Big Clucker
 
human-product's Avatar
 
Join Date: Aug 2010
Location: Menton, France
Posts: 63
Reputation: 0
Default Re : [REL] Encrypt

Thanks!!
__________________
----------------------------------------------------------------
Stars Role Play: www.starsroleplay.com (Nom de domaine en cration/Domain name in creation)
--------------------------------------------------------------
Sorry for my English, I use ****** translation ...
human-product is offline   Reply With Quote
Old 23/09/2011, 07:00 PM   #14
GangsTa_
High-roller
 
GangsTa_'s Avatar
 
Join Date: May 2010
Location: Republic of Moldova
Posts: 1,130
Reputation: 51
Default Re: [REL] Encrypt

Whirlpool is good too.. Good choice with MD5.
GangsTa_ is offline   Reply With Quote
Old 07/10/2011, 11:09 AM   #15
TheBest6
Big Clucker
 
TheBest6's Avatar
 
Join Date: Oct 2011
Posts: 105
Reputation: 2
Default Re : [REL] Encrypt

Nice
__________________


TheBest6 is offline   Reply With Quote
Old 08/08/2013, 05:32 PM   #16
Stylock
Huge Clucker
 
Stylock's Avatar
 
Join Date: Dec 2010
Posts: 321
Reputation: 146
Default Re: [REL] Encrypt

There's a bug when I try to use sha2_hmac:
Code:
Erorr native function sha2_file: Expecting 3 parameter(s), but found 4
I think it's most definitely related to this piece of code:
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.
Stylock is offline   Reply With Quote
Old 08/08/2013, 08:10 PM   #17
Mellnik
Gangsta
 
Mellnik's Avatar
 
Join Date: Dec 2011
Location: Paradise Falls, CAℕADA
Posts: 797
Reputation: 369
Default AW: Re: [REL] Encrypt

Quote:
Originally Posted by Stylock View Post
There's a bug when I try to use sha2_hmac:
Code:
Erorr native function sha2_file: Expecting 3 parameter(s), but found 4
I think it's most definitely related to this piece of code:
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
Mellnik is offline   Reply With Quote
Old 04/01/2017, 03:06 AM   #18
DandyCorleone
Banned
 
Join Date: May 2016
Posts: 172
Reputation: 3
Default Re: [REL] Encrypt

how to connect with website pcp if i wanna login?

example with whirlpool, use wp_hash
PHP Code:
<?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.');
        }
    }
DandyCorleone is offline   Reply With Quote
Old 05/01/2017, 01:55 PM   #19
BroZeus
High-roller
 
BroZeus's Avatar
 
Join Date: Jan 2014
Location: India
Posts: 1,393
Reputation: 158
Default Re: [REL] Encrypt

Quote:
Originally Posted by DandyCorleone View Post
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://wiki.sa-mp.com/wiki/SHA256_PassHash ) so if you want to use sha256 use the native function.

However whirlpool is still better than the above hash algorithms.
__________________


"Be the change that you wish to see in the world."

Check out my Github profile!
BroZeus is offline   Reply With Quote
Old 06/01/2017, 02:18 AM   #20
DarkChildren
Gangsta
 
DarkChildren's Avatar
 
Join Date: Oct 2009
Location: Espaa
Posts: 685
Reputation: 9
Default Respuesta: [REL] Encrypt

Amazing!!!
__________________
Aprende a ser tu mismo
DarkChildren is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] Encrypt Fro1sha Релизы/Releases 11 16/06/2010 10:29 PM
[Include] [INC] Simple Encrypt Janson_GH Includes 2 30/05/2010 08:07 AM
Encrypt to Decrypt stefanlg Help Archive 3 08/01/2010 12:17 AM
Undefined Encrypt SnW Help Archive 4 18/12/2009 04:48 PM
Encrypt() and mysql watchout Help Archive 6 13/04/2009 08:35 PM


All times are GMT. The time now is 11:00 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.