Skip to content
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

Exports C14nCanonicalization, ExclusiveCanonicalization #335

Merged
merged 1 commit into from
Jul 8, 2023

Conversation

angeljqv
Copy link
Contributor

@angeljqv angeljqv commented Jul 7, 2023

Closes #331

This allow us to do

const C14nCanonicalization = require('xml-crypto').C14nCanonicalization 
const ExclusiveCanonicalization= require('xml-crypto').ExclusiveCanonicalization

// Use Example 
const DOMParser = require("@xmldom/xmldom").DOMParser
let xml_string = '<root><child>123</child></root>'
let documentElement= (new DOMParser()).parseFromString(xml_string).documentElement

// C14nCanonicalization
console.log( (new C14nCanonicalization()).process(documentElement, {}).toString() )
// ExclusiveCanonicalization
console.log( (new ExclusiveCanonicalization()).process(documentElement, {}).toString() )

This is not a breaking change
Any correction I will try to correct immediately

@cjbarth cjbarth merged commit 6bcbaa6 into node-saml:3.x Jul 8, 2023
@cjbarth
Copy link
Contributor

cjbarth commented Jul 8, 2023

Can you please create a similar PR against master so we can keep things in sync?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants