You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -58,10 +58,8 @@ var key = new NodeRSA([keyData, [format]], [options]);
58
58
You can specify some options by second/third constructor argument, or over `key.setOptions()` method.
59
59
60
60
* environment — working environment (default autodetect):
61
-
*`'browser'`,
62
-
*`'node10'` for `nodejs 0.10.x` — provide native sign/verify methods.
63
-
*`'node'` for `nodejs 0.12.x` — provide also native publicEncrypt/privateDecrypt methods.
64
-
*`'iojs'` for `io.js 1.x` — provide also native publicDecrypt/privateEncrypt methods.
61
+
*`'browser'` — will run pure js implementation of RSA algorithms.
62
+
*`'node'` for `nodejs >= 0.10.x or io.js >= 1.x` — provide some native methods like sign/verify and encrypt/decrypt.
65
63
* encryptionScheme — padding scheme for encrypt/decrypt. Can be `'pkcs1_oaep'` or `'pkcs1'`. Default `'pkcs1_oaep'`.
66
64
* signingScheme — scheme used for signing and verifying. Can be `'pkcs1'` or `'pss'` or 'scheme-hash' format string (eg `'pss-sha1'`). Default `'pkcs1-sha256'`, or, if chosen pss: `'pss-sha1'`.
67
65
@@ -187,6 +185,7 @@ Return max data size for encrypt in bytes.
key.encryptPrivate(buffer, [encoding], [source_encoding]); // using private key for encryption
190
189
```
191
190
Return encrypted data.<br/>
192
191
@@ -196,6 +195,7 @@ Return encrypted data.<br/>
196
195
197
196
```javascript
198
197
key.decrypt(buffer, [encoding]);
198
+
key.decryptPublic(buffer, [encoding]); // using public key for decryption
199
199
```
200
200
Return decrypted data.<br/>
201
201
@@ -224,6 +224,13 @@ Questions, comments, bug reports, and pull requests are all welcome.
224
224
225
225
## Changelog
226
226
227
+
### 0.2.20
228
+
* Added `.encryptPrivate()` and `.decryptPublic()` methods
229
+
* Encrypt/decrypt methods in nodejs 0.12.x and io.js using native implementation (40x speed boost)
230
+
***KNOWN ISSUES**:
231
+
*`encryptPrivate` and `decryptPublic` don't have native implementation in nodejs
232
+
*`encryptPrivate` and `decryptPublic` with pkcs1_oaep padding scheme don't work in io.js and using js implementation
233
+
227
234
### 0.2.10
228
235
***Methods `.exportPrivate()` and `.exportPublic()` was replaced by `.exportKey([format])`.**
229
236
* By default `.exportKey()` returns private key as `.exportPrivate()`, if you need public key from `.exportPublic()` you must specify format as `'public'` or `'pkcs8-public-pem'`.
0 commit comments