public function validate(XMLSecurityKey $key) : bool
    {
        Assert::same($key->type, XMLSecurityKey::RSA_SHA256);

        if ($this->signatureData === null) {
            return false;
        }

        Utils::validateSignature($this->signatureData, $key);

        return true;
    }
public function validate(XMLSecurityKey $key) : bool
    {
        Assert::same($key->type, XMLSecurityKey::RSA_SHA256);

        if ($this->signatureData === null) {
            return false;
        }

        Utils::validateSignature($this->signatureData, $key);

        return true;
    }
public function validate ( XMLSecurityKey $ key ) : bool { Assert :: same ( $ key -> type , XMLSecurityKey :: RSA_SHA256 ) ; if ( $ this -> signatureData === null ) { return false ; } Utils :: validateSignature ( $ this -> signatureData , $ key ) ; return true ; }
Validate this assertion against a public key.

If no signature was present on the assertion, we will return false.
Otherwise, true will be returned. An exception is thrown if the
signature validation fails.

@param  XMLSecurityKey $key The key we should check against.
@return boolean        true if successful, false if it is unsigned.
Validate this assertion against a public key .