Esempio n. 1
0
 public function getPasswordId() : string
 {
     return $this->password->getId();
 }
Esempio n. 2
0
/**
 * @param PasswordInterface $p
 * @param string $salt
 * @param int $length
 * @param int $iterations
 *
 * @return bool|string
 */
function generate_key(PasswordInterface $p, string $salt, int $length = 32, int $iterations = 1) : string
{
    return hash_pbkdf2('sha1', $p->getPassword(), $salt, $iterations, $length, true);
}