xml-crypto
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -88,6 +88,7 @@ var xpath = require('xpath') | ||
*/ | ||
this.getSignature = function(signedInfo, signingKey) { | ||
this.getSignature = function(signedInfo, signingKey, callback) { | ||
var signer = crypto.createSign("RSA-SHA1") | ||
signer.update(signedInfo) | ||
var res = signer.sign(signingKey, 'base64') | ||
if (callback) callback(null, res) | ||
return res | ||
@@ -100,6 +101,7 @@ } | ||
*/ | ||
this.verifySignature = function(str, key, signatureValue) { | ||
this.verifySignature = function(str, key, signatureValue, callback) { | ||
var verifier = crypto.createVerify("RSA-SHA1") | ||
verifier.update(str) | ||
var res = verifier.verify(key, signatureValue, 'base64') | ||
if (callback) callback(null, res) | ||
return res | ||
@@ -125,6 +127,7 @@ } | ||
*/ | ||
this.getSignature = function(signedInfo, signingKey) { | ||
this.getSignature = function(signedInfo, signingKey, callback) { | ||
var signer = crypto.createSign("RSA-SHA256") | ||
signer.update(signedInfo) | ||
var res = signer.sign(signingKey, 'base64') | ||
if (callback) callback(null, res) | ||
return res | ||
@@ -137,6 +140,7 @@ } | ||
*/ | ||
this.verifySignature = function(str, key, signatureValue) { | ||
this.verifySignature = function(str, key, signatureValue, callback) { | ||
var verifier = crypto.createVerify("RSA-SHA256") | ||
verifier.update(str) | ||
var res = verifier.verify(key, signatureValue, 'base64') | ||
if (callback) callback(null, res) | ||
return res | ||
@@ -161,6 +165,7 @@ } | ||
*/ | ||
this.getSignature = function(signedInfo, signingKey) { | ||
this.getSignature = function(signedInfo, signingKey, callback) { | ||
var signer = crypto.createSign("RSA-SHA512") | ||
signer.update(signedInfo) | ||
var res = signer.sign(signingKey, 'base64') | ||
if (callback) callback(null, res) | ||
return res | ||
@@ -173,6 +178,7 @@ } | ||
*/ | ||
this.verifySignature = function(str, key, signatureValue) { | ||
this.verifySignature = function(str, key, signatureValue, callback) { | ||
var verifier = crypto.createVerify("RSA-SHA512") | ||
verifier.update(str) | ||
var res = verifier.verify(key, signatureValue, 'base64') | ||
if (callback) callback(null, res) | ||
return res | ||
@@ -179,0 +185,0 @@ } |
{ | ||
"name": "xml-crypto", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "Xml digital signature and encryption library for Node.js", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76888
1391