public function addSignature(string $signature, array $protectedHeader, ?string $encodedProtectedHeader, array $header = []): self
    {
        $jws = clone $this;
        $jws->signatures[] = Signature::create($signature, $protectedHeader, $encodedProtectedHeader, $header);

        return $jws;
    }
public function addSignature(string $signature, array $protectedHeader, ?string $encodedProtectedHeader, array $header = []): self
    {
        $jws = clone $this;
        $jws->signatures[] = Signature::create($signature, $protectedHeader, $encodedProtectedHeader, $header);

        return $jws;
    }
public function addSignature ( string $ signature , array $ protectedHeader , ? string $ encodedProtectedHeader , array $ header = [ ] ) : self { $ jws = clone $ this ; $ jws -> signatures [ ] = Signature :: create ( $ signature , $ protectedHeader , $ encodedProtectedHeader , $ header ) ; return $ jws ; }
This method adds a signature to the JWS object.
Its returns a new JWS object.

@internal

@return JWS
This method adds a signature to the JWS object . Its returns a new JWS object .