private function parseSignature(array $header, string $data): Signature
    {
        if ($data === '' || ! isset($header['alg']) || $header['alg'] === 'none') {
            return Signature::fromEmptyData();
        }

        $hash = $this->decoder->base64UrlDecode($data);

        return new Signature($hash, $data);
    }
private function parseSignature(array $header, string $data): Signature
    {
        if ($data === '' || ! isset($header['alg']) || $header['alg'] === 'none') {
            return Signature::fromEmptyData();
        }

        $hash = $this->decoder->base64UrlDecode($data);

        return new Signature($hash, $data);
    }
private function parseSignature ( array $ header , string $ data ) : Signature { if ( $ data === '' || ! isset ( $ header [ 'alg' ] ) || $ header [ 'alg' ] === 'none' ) { return Signature :: fromEmptyData ( ) ; } $ hash = $ this -> decoder -> base64UrlDecode ( $ data ) ; return new Signature ( $ hash , $ data ) ; }
Returns the signature from given data

@param mixed[] $header
Returns the signature from given data