src/Encode.php
public function signature(string $header, string $payload, string $secret): string
    {
        return $this->encode(
            $this->hash(
                $this->getHashAlgorithm(),
                $this->encode($header) . "." . $this->encode($payload),
                $secret
            )
        );
    }
public function signature(string $header, string $payload, string $secret): string
    {
        return $this->encode(
            $this->hash(
                $this->getHashAlgorithm(),
                $this->encode($header) . "." . $this->encode($payload),
                $secret
            )
        );
    }
public function signature ( string $ header , string $ payload , string $ secret ) : string { return $ this -> encode ( $ this -> hash ( $ this -> getHashAlgorithm ( ) , $ this -> encode ( $ header ) . "." . $ this -> encode ( $ payload ) , $ secret ) ) ; }
Generate the JWT signature. The header and payload are encoded,
concatenated with a dot, hashed via sha256 with a secret, and then
encoded and returned.

@param string $header
@param string $payload
@param string $secret
@return string
Generate the JWT signature . The header and payload are encoded concatenated with a dot hashed via sha256 with a secret and then encoded and returned .