Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xml-crypto

Package Overview
Dependencies
Maintainers
3
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xml-crypto - npm Package Compare versions

Comparing version 1.5.2 to 1.5.3

18

lib/signed-xml.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc