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

xml-crypto

Package Overview
Dependencies
Maintainers
4
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.3 to 2.0.0

14

lib/signed-xml.js

@@ -333,5 +333,17 @@ var xpath = require('xpath')

'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512': RSASHA512,
'http://www.w3.org/2000/09/xmldsig#hmac-sha1': HMACSHA1
// Disabled by default due to key confusion concerns.
// 'http://www.w3.org/2000/09/xmldsig#hmac-sha1': HMACSHA1
}
/**
* Due to key-confusion issues, its risky to have both hmac
* and digital signature algos enabled at the same time.
* This enables HMAC and disables other signing algos.
*/
SignedXml.enableHMAC = function () {
SignedXml.SignatureAlgorithms = {
'http://www.w3.org/2000/09/xmldsig#hmac-sha1': HMACSHA1
}
}
SignedXml.defaultNsForPrefix = {

@@ -338,0 +350,0 @@ ds: 'http://www.w3.org/2000/09/xmldsig#'

2

package.json
{
"name": "xml-crypto",
"version": "1.5.3",
"version": "2.0.0",
"description": "Xml digital signature and encryption library for Node.js",

@@ -5,0 +5,0 @@ "engines": {

@@ -37,4 +37,14 @@ ## xml-crypto

* RSA-SHA512 http://www.w3.org/2001/04/xmldsig-more#rsa-sha512
HMAC-SHA1 is also available but it is disabled by default
* HMAC-SHA1 http://www.w3.org/2000/09/xmldsig#hmac-sha1
to enable HMAC-SHA1, do:
```javascript
require( 'xml-crypto' ).SignedXml.enableHMAC();
```
This will enable HMAC and disable digital signature algorithms. Due to key
confusion issues, it is risky to have both HMAC-based and public key digital
signature algorithms enabled at same time.
by default the following algorithms are used:

@@ -41,0 +51,0 @@

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