We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56c73c9 commit afb6ce9Copy full SHA for afb6ce9
src/NodeRSA.js
@@ -47,8 +47,8 @@ module.exports = (function() {
47
bits = bits || 2048;
48
exp = 65537;
49
50
- if (bits % 2 == 1) {
51
- throw Error('Key size must be even.');
+ if (bits % 8 != 0) {
+ throw Error('Key size must be a multiple of 8.');
52
}
53
54
this.keyPair.generate(bits, exp.toString(16));
0 commit comments