DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   md5 superhashing (http://www.daniweb.com/forums/thread114959.html)

Dsiembab Mar 20th, 2008 7:22 pm
md5 superhashing
 
I like to read about hashing passwords and have read articles about how md5 and sha-1 could be deciphered albiet it would take 25 million dollar computer and time but still if you could take a password and split it into two pieces and md5 hashed the two pieces add a salt in between and bring the two pieces togethter and md5 hash that i.e.
<?php
$password = $_POST['password'];
$length=strlen($password);
$divide=round($length/2);
$pass=str_split($password, $divide);
$salt ="097ever";
$pass1=md5($pass[0]);
$pass2=md5($pass[1]);
$newpass=md5($pass1.$salt.$pass2);
?>
this might add a half hour to your 25 million dollar computer.

Suomedia Mar 21st, 2008 11:20 am
Re: md5 superhashing
 
It is said that if you could sit a monkey in front of a typewriter for long enough it would eventually type out the Lord's prayer.....


Matti Ressler
Suomedia

Dsiembab Mar 21st, 2008 4:14 pm
Re: md5 supersalting
 
so if I used an array instead like this
<?php
$password = $_POST['password'];
$length=strlen($password);
$divide=round($length/2);
$pass=str_split($password, $divide);
$salt =array(b,o,n,k,y,w,l,e,m);
$saltydog=array_pop($salt);
$pass1=md5($pass[0]);
$pass2=md5($pass[1]);
$newpass=md5($pass1.$salt[0].$salt[6].$salt[1].$salt[5].$saltydog.$salt[6].$saltydog.$salt[1].$salt[2].$salt[3].$salt[7].$salt[4].$pass2);
?>
does that make more sense richard?


All times are GMT -4. The time now is 2:10 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC