code/libraries/joomlatools/library/http/token/token.php
public function getSignature($secret = null)
    {
        $signature = '';

        if($this->_algorithm)
        {
            $header  = $this->_toBase64url($this->_toJson($this->_header));
            $payload = $this->_toBase64url($this->_toJson($this->_claims));

            $message   = sprintf("%s.%s", $header, $payload);
            $signature = hash_hmac($this->_algorithm, $message, $secret, true);
        }

        return $signature;
    }
public function getSignature($secret = null)
    {
        $signature = '';

        if($this->_algorithm)
        {
            $header  = $this->_toBase64url($this->_toJson($this->_header));
            $payload = $this->_toBase64url($this->_toJson($this->_claims));

            $message   = sprintf("%s.%s", $header, $payload);
            $signature = hash_hmac($this->_algorithm, $message, $secret, true);
        }

        return $signature;
    }
public function getSignature ( $ secret = null ) { $ signature = '' ; if ( $ this -> _algorithm ) { $ header = $ this -> _toBase64url ( $ this -> _toJson ( $ this -> _header ) ) ; $ payload = $ this -> _toBase64url ( $ this -> _toJson ( $ this -> _claims ) ) ; $ message = sprintf ( "%s.%s" , $ header , $ payload ) ; $ signature = hash_hmac ( $ this -> _algorithm , $ message , $ secret , true ) ; } return $ signature ; }
Get the token signature

@param string|null $secret  The secret key
@return string
Get the token signature