How to use the xml-crypto.SignedXml.prototype function in xml-crypto

To help you get started, we’ve selected a few xml-crypto examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github socialtables / saml-protocol / lib / util / signing.js View on Github external
function createURLSignature(privateKeyPem, signedPayload, sigAlg) {
	const privateKeyPemWithHeaders = pemFormatting.addPEMHeaders("RSA PRIVATE KEY", privateKeyPem);
	const signingAlgorithmName = resolveSignatureAlgorithm(sigAlg);
	return SignedXml
		.prototype
		.findSignatureAlgorithm(signingAlgorithmName)
		.getSignature(signedPayload, privateKeyPemWithHeaders);
}

xml-crypto

Xml digital signature and encryption library for Node.js

MIT
Latest version published 9 months ago

Package Health Score

83 / 100
Full package analysis