No.So basically a good practice would be to hash your clients passwords with there email or username then encrypt with md5 or sha1? Stay away from normal encryptions loll I am knew using strait md5 and sha1 was bad but I didn't know a few things in the video. Thanks this helped
Kinda confusing :/ could you show an example of correct salt and hash method in php as an example then?No.
Their explanation:
Do NOT hash their username or email together with your password. INSTEAD, create salts and hash them together under a few layers of hash.
<?php
//Password
$password = 'this_is_my_password';
//Creating SIMPLE salts.
$salt_1 = sha1(uniqid());
$salt_2 = sha1(time());
$new_password = $salt_1 . $password . $salt_2;
$hashed_password = sha1(md5($new_password));
echo $hashed_password;
?>
Bad idea to base the salts on a time/date etc, because when you come back to compare, they will be different.Something like this:
PHP:<?php //Password $password = 'this_is_my_password'; //Creating SIMPLE salts. $salt_1 = sha1(uniqid()); $salt_2 = sha1(time()); $new_password = $salt_1 . $password . $salt_2; $hashed_password = sha1(md5($new_password)); echo $hashed_password; ?>
sha1 isSomething like this:
PHP:<?php //Password $password = 'this_is_my_password'; //Creating SIMPLE salts. $salt_1 = sha1(uniqid()); $salt_2 = sha1(time()); $new_password = $salt_1 . $password . $salt_2; $hashed_password = sha1(md5($new_password)); echo $hashed_password; ?>