code/libraries/joomlatools/library/http/token/token.php
public function setAlgorithm($algorithm)
    {
        $algorithms = array(
            'HS256' => 'sha256',
            'HS384' => 'sha384',
            'HS512' => 'sha512',
            'none'  => false
        );

        if (!isset($algorithms[$algorithm])) {
            throw new DomainException('Algorithm not supported');
        }

        $this->_header['alg'] = $algorithm;
        $this->_algorithm     = $algorithms[$algorithm];

        return $this;
    }
public function setAlgorithm($algorithm)
    {
        $algorithms = array(
            'HS256' => 'sha256',
            'HS384' => 'sha384',
            'HS512' => 'sha512',
            'none'  => false
        );

        if (!isset($algorithms[$algorithm])) {
            throw new DomainException('Algorithm not supported');
        }

        $this->_header['alg'] = $algorithm;
        $this->_algorithm     = $algorithms[$algorithm];

        return $this;
    }
public function setAlgorithm ( $ algorithm ) { $ algorithms = array ( 'HS256' => 'sha256' , 'HS384' => 'sha384' , 'HS512' => 'sha512' , 'none' => false ) ; if ( ! isset ( $ algorithms [ $ algorithm ] ) ) { throw new DomainException ( 'Algorithm not supported' ) ; } $ this -> _header [ 'alg' ] = $ algorithm ; $ this -> _algorithm = $ algorithms [ $ algorithm ] ; return $ this ; }
Sets cryptographic algorithm used to secure the token.

@param string $algorithm The signing algorithm. Supported algorithms are 'HS256', 'HS384' and 'HS512' or none
@throws DomainException If an unsupported algorithm was specified
@return KHttpToken
Sets cryptographic algorithm used to secure the token .