Hash password on PHP
#1

Hey guys I want to make a password hash on php page. How can I make this. Please help me..

Codes:

Hash Function
Код:
<php?
function udb_hash($buf) { 
    $length=strlen($buf); 
    $s1 = 1; 
    $s2 = 0; 
    for($n=0; $n<$length; $n++) 
    { 
       $s1 = ($s1 + ord($buf[$n])) % 65521; 
       $s2 = ($s2 + $s1) % 65521; 
    } 
    return ($s2 << 16) + $s1;
?>

index.php
Код:
<html>
<body>
<form action="hash.php" method="post">
Text for Hash: <input type="text" name="name"><br>
<input type="submit">
</form>

</body>
</html>

hash.php
Код:
<html>
<body>

Hash: <?php echo $_POST["name"]; ?>

</body>
</html>
Reply


Messages In This Thread
Hash password on PHP - by Sensation - 31.05.2015, 15:24
Re: Hash password on PHP - by Vince - 31.05.2015, 16:38
Re: Hash password on PHP - by Sensation - 31.05.2015, 17:29

Forum Jump:


Users browsing this thread: 1 Guest(s)