<?php
function hasha($passwordoriginale){
$crypt = md5(sha1(md5(md5(sha1($passwordoriginale)))));
$caratteri_disponibili ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
$lunghezza= 22;
$salt = "";
for($i = 0; $i<$lunghezza; $i++){
$salt = $salt.substr($caratteri_disponibili,rand(0,strlen($caratteri_disponibili)-1),1);
}
$newsalt= '$2a$07$'.$salt.'$';
$hashed_password = crypt($crypt,$newsalt);
return $hashed_password;
}
$passworddacrittare = "password";
$passwordcrittata = hasha($passworddacrittare);
?>
- Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0
- Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Process exited with code 139.
preferences:
147.19 ms | 402 KiB | 175 Q