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