Skip to content

Commit 4382a4b

Browse files
committed
removed native support for encryptPrivate and decryptPublic
1 parent f291443 commit 4382a4b

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ Questions, comments, bug reports, and pull requests are all welcome.
209209

210210
## Changelog
211211

212+
### 0.2.22
213+
* Native support for `encryptPrivate` and `decryptPublic` in io.js caused error in linux and was removed.
214+
212215
### 0.2.20
213216
* Added `.encryptPrivate()` and `.decryptPublic()` methods.
214217
* Encrypt/decrypt methods in nodejs 0.12.x and io.js using native implementation (> 40x speed boost).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-rsa",
3-
"version": "0.2.21",
3+
"version": "0.2.22",
44
"description": "Node.js RSA library",
55
"main": "src/NodeRSA.js",
66
"scripts": {

src/encryptEngines/encryptEngines.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ module.exports = {
55
var engine = require('./js.js');
66
if (options.environment === 'node') {
77
if (typeof crypt.publicEncrypt === 'function' && typeof crypt.privateDecrypt === 'function') {
8+
engine = require('./node12.js');
9+
10+
/*
11+
12+
io.js privateEncrypt/publicDecrypt with different environments causing error in linux
13+
814
if (typeof crypt.privateEncrypt === 'function' && typeof crypt.publicDecrypt === 'function') {
915
engine = require('./io.js');
1016
} else {
1117
engine = require('./node12.js');
12-
}
18+
}*/
1319
}
1420
}
1521
return engine(keyPair, options);

0 commit comments

Comments
 (0)