src/Pdefreitas/VanillaSSO/VanillaSSO.php
protected static function JsHash($String, $Secure = TRUE)
    {
        if ($Secure === TRUE)
            $Secure = 'md5';

        switch ($Secure) {
            case 'sha1':
                return sha1($String);
                break;
            case 'md5':
            case FALSE:
                return md5($String);
            default:
                return hash($Secure, $String);
        }
    }
protected static function JsHash($String, $Secure = TRUE)
    {
        if ($Secure === TRUE)
            $Secure = 'md5';

        switch ($Secure) {
            case 'sha1':
                return sha1($String);
                break;
            case 'md5':
            case FALSE:
                return md5($String);
            default:
                return hash($Secure, $String);
        }
    }
protected static function JsHash ( $ String , $ Secure = TRUE ) { if ( $ Secure === TRUE ) $ Secure = 'md5' ; switch ( $ Secure ) { case 'sha1' : return sha1 ( $ String ) ; break ; case 'md5' : case FALSE : return md5 ( $ String ) ; default : return hash ( $ Secure , $ String ) ; } }
Return the hash of a string.
@param string $String The string to hash.
@param string|bool $Secure The hash algorithm to use. TRUE means md5.
@return string
@since 1.1b
Return the hash of a string .