Neos\Flow\Security\Cryptography\SaltedMd5HashingStrategy::generateSaltedMd5 PHP 메소드

generateSaltedMd5() 공개 정적인 메소드

Generates a salted md5 hash over the given string.
public static generateSaltedMd5 ( string $clearString ) : string
$clearString string The unencrypted string which is the subject to be hashed
리턴 string Salted hash and the salt, separated by a comma ","
    public static function generateSaltedMd5($clearString)
    {
        $salt = substr(md5(uniqid(rand(), true)), 0, rand(6, 10));
        return md5(md5($clearString) . $salt) . ',' . $salt;
    }