public function get(string $algorithm): Algorithm
    {
        if (!$this->has($algorithm)) {
            throw new \InvalidArgumentException(\sprintf('The algorithm "%s" is not supported.', $algorithm));
        }

        return $this->algorithms[$algorithm];
    }
public function get(string $algorithm): Algorithm
    {
        if (!$this->has($algorithm)) {
            throw new \InvalidArgumentException(\sprintf('The algorithm "%s" is not supported.', $algorithm));
        }

        return $this->algorithms[$algorithm];
    }
public function get ( string $ algorithm ) : Algorithm { if ( ! $ this -> has ( $ algorithm ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'The algorithm "%s" is not supported.' , $ algorithm ) ) ; } return $ this -> algorithms [ $ algorithm ] ; }
Returns the algorithm if supported, otherwise throw an exception.

@param string $algorithm The algorithm
Returns the algorithm if supported otherwise throw an exception .