Encrypt::hash()
\nn\t3::Encrypt()->hash($string = '');
Einfaches Hashing, z.B. beim Check einer uid gegen ein Hash.
\nn\t3::Encrypt()->hash( $uid );
Copied!
Existiert auch als ViewHelper:
{something->nnt3:encrypt.hash()}
Copied!
| @return string
Source Code
public function hash( $string = '' ) {
$salt = $this->getSaltingKey();
return preg_replace('/[^a-zA-Z0-9]/', '', base64_encode( sha1("{$string}-{$salt}", true )));
}
Copied!