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.

Recommended Answers

All 2 Replies

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

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.