Skip to content

Commit

Permalink
Default to SHA1 as OAEP hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonardo Zanivan committed Jan 6, 2025
1 parent 08394e8 commit 4882b1e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/xmlenc.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,9 @@ function decryptKeyInfo(doc, options) {
case 'http://www.w3.org/2000/09/xmldsig#sha256':
options.oaepHash = 'sha256';
break;
case 'http://www.w3.org/2000/09/xmldsig#sha512':
options.oaepHash = 'sha512';
break;
default:
throw new Error('key encryption digest algorithm ' + keyDigestMethodAlgorithm + ' not supported');
case 'http://www.w3.org/2000/09/xmldsig#sha512':
options.oaepHash = 'sha512';
break;
}
}

Expand Down

0 comments on commit 4882b1e

Please sign in to comment.