SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 06/07/2015, 03:16 PM   #1
nezo2001
Gangsta
 
Join Date: Nov 2014
Location: Cairo, Egypt
Posts: 680
Reputation: 26
Default udb_hash

What steps does udb_hash use to change to password to numbers
PHP Code:
stock udb_hash(buf[])
{   
    new 
length=strlen(buf);
    new 
s1 1;
    new 
s2 0;
    new 
n;
    for (
n=0n<lengthn++)
    {
       
s1 = (s1 buf[n]) % 65521;
       
s2 = (s2 s1)     % 65521;
    }
    return (
s2 << 16) + s1;

__________________
Quote:
Originally Posted by Human
When im met u, u were nub at scripting xD.

But now, i'm impressed. Good job.
Don't look at my history. Everyone started somewhere
nezo2001 is offline   Reply With Quote
Old 06/07/2015, 03:19 PM   #2
liquor
Huge Clucker
 
Join Date: Oct 2011
Posts: 295
Reputation: 19
Default Re: udb_hash

What do you wanna do?
I'd suggest using Whirlpool or another encryption method instead.
liquor is offline   Reply With Quote
Old 06/07/2015, 03:23 PM   #3
Excel™
Gangsta
 
Excel™'s Avatar
 
Join Date: Jul 2012
Posts: 548
Reputation: 95
Default Re: udb_hash

The code gives you the full explanation of steps LOL!!'
__________________
NO MORE CODING SAMP :V
JUST PLAYING...
Excel™ is offline   Reply With Quote
Old 06/07/2015, 04:01 PM   #4
nezo2001
Gangsta
 
Join Date: Nov 2014
Location: Cairo, Egypt
Posts: 680
Reputation: 26
Default Re: udb_hash

I wanna hash the password with php :/
So I want to know the steps.
__________________
Quote:
Originally Posted by Human
When im met u, u were nub at scripting xD.

But now, i'm impressed. Good job.
Don't look at my history. Everyone started somewhere
nezo2001 is offline   Reply With Quote
Old 06/07/2015, 04:14 PM   #5
!damo!spiderman
Huge Clucker
 
!damo!spiderman's Avatar
 
Join Date: Oct 2006
Posts: 244
Reputation: 160
Default Re: udb_hash

Quote:
Originally Posted by nezo2001 View Post
I wanna hash the password with php :/
So I want to know the steps.
You can pretty much copy and paste that code in PHP and only change a few things like variables.
__________________
!damo!spiderman 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
udb_hash TheSnaKe Scripting Help 4 16/03/2015 03:45 PM
udb_hash BoU3A Scripting Help 10 22/09/2013 02:40 PM
udb_hash in php? milanosie Scripting Help 3 13/02/2013 12:50 PM
udb_hash help Ironboy500[TW] Help Archive 2 31/10/2010 12:08 PM
Help with udb_hash. Bumbis Help Archive 2 01/09/2010 05:20 PM


All times are GMT. The time now is 06:35 AM.


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