src/Message/AbstractRequest.php
public function generateDigest(DOMDocument $xml)
    {
        $xml = $xml->cloneNode(true);

        // strip Signature
        foreach ($this->getXPath($xml)->query('ds:Signature') as $node) {
            $node->parentNode->removeChild($node);
        }

        $message = $this->c14n($xml);

        return base64_encode(hash('sha256', $message, true));
    }
public function generateDigest(DOMDocument $xml)
    {
        $xml = $xml->cloneNode(true);

        // strip Signature
        foreach ($this->getXPath($xml)->query('ds:Signature') as $node) {
            $node->parentNode->removeChild($node);
        }

        $message = $this->c14n($xml);

        return base64_encode(hash('sha256', $message, true));
    }
public function generateDigest ( DOMDocument $ xml ) { $ xml = $ xml -> cloneNode ( true ) ; // strip Signature foreach ( $ this -> getXPath ( $ xml ) -> query ( 'ds:Signature' ) as $ node ) { $ node -> parentNode -> removeChild ( $ node ) ; } $ message = $ this -> c14n ( $ xml ) ; return base64_encode ( hash ( 'sha256' , $ message , true ) ) ; }
Generate sha256 digest of xml

@param DOMNode
@return string
Generate sha256 digest of xml