protected function sign($input)
    {
        // HMAC SHA.
        if (\substr($this->algo, 0, 2) === 'HS') {
            return \hash_hmac($this->algos[$this->algo], $input, $this->key, true);
        }

        $this->validateKey();

        \openssl_sign($input, $signature, $this->key, $this->algos[$this->algo]);

        return $signature;
    }
protected function sign($input)
    {
        // HMAC SHA.
        if (\substr($this->algo, 0, 2) === 'HS') {
            return \hash_hmac($this->algos[$this->algo], $input, $this->key, true);
        }

        $this->validateKey();

        \openssl_sign($input, $signature, $this->key, $this->algos[$this->algo]);

        return $signature;
    }
protected function sign ( $ input ) { // HMAC SHA. if ( \ substr ( $ this -> algo , 0 , 2 ) === 'HS' ) { return \ hash_hmac ( $ this -> algos [ $ this -> algo ] , $ input , $ this -> key , true ) ; } $ this -> validateKey ( ) ; \ openssl_sign ( $ input , $ signature , $ this -> key , $ this -> algos [ $ this -> algo ] ) ; return $ signature ; }
Sign the input with configured key and return the signature.

@param string $input

@return string
Sign the input with configured key and return the signature .