-
Notifications
You must be signed in to change notification settings - Fork 37
C14N options #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
C14N options #29
Conversation
Thanks for the PR. Please check the test results: https://github.com/selective-php/xmldsig/actions/runs/14814040829/job/41639555159?pr=29 |
Please check for the latest build result. Note: Locally you can also run "composer stan" or "composer test:all" to see the results. |
Did you check it out? |
I will check today. |
{ | ||
$element = $element ?? $document->documentElement; | ||
|
||
if ($element === null) { | ||
throw new XmlSignerException('Invalid XML document element'); | ||
} | ||
|
||
$canonicalData = $element->C14N(true, false); | ||
$canonicalData = $element->C14N($this->exclusive, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the use case for this?
|
||
public function __construct( | ||
CryptoSignerInterface $cryptoSigner, | ||
bool $preserveWhiteSpace = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer having immutable with* Methods for these new parameters.
e.g. withPreserveWhiteSpace() and withExclusive()
I'm implementing this library for the upcoming official electronic invoicing system required by the Dominican Republic's IRS (DGII).
For that use case, some parameters need to be set (related to C14N and preserving whitespaces). This pull request adds the option to specifying those parameters.