I have an xml document (soap message) , wish i need to sign a part of it (the body). the Algorithm in the server require a sha256 of the body in the exclusive C14n format.
The problem that i hadn't built the document using the DOMDocument, I am just using strings and curl to send, so i can't use the ->C14N(true) method.
any alternatives?
PS: i tried to hash the raw string in sha256, but it doesn't give the same output as a hashed exclusive c14n canocalized string.
example of body :
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="id-samplebody">
<node1 data="x"/>
</soap:Body>