- substr: documentation ( source)
- time: documentation ( source)
- sha1: documentation ( source)
- md5: documentation ( source)
<?php
function createPassword($input) {
$this->salt = substr(md5(time()), 0, 20);
return sha1($this->salt . sha1($input) . $this->salt);
$salt = $this->salt;
}
createPassword("cieren");
echo $salt;