Skip to content

Commit 407022a

Browse files
committed
update readme
1 parent e248773 commit 407022a

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

README.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,31 +63,16 @@ You can specify some options by second/third constructor argument, or over `key.
6363
* encryptionScheme — padding scheme for encrypt/decrypt. Can be `'pkcs1_oaep'` or `'pkcs1'`. Default `'pkcs1_oaep'`.
6464
* 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'`.
6565

66-
**Advanced options:**<br/>
67-
You also can specify advanced options for some schemes like this:
68-
```javascript
69-
options = {
70-
encryptionScheme: {
71-
scheme: 'pkcs1_oaep', //scheme
72-
hash: 'md5', //hash using for scheme
73-
mgf: function(...) {...} //mask generation function
74-
},
75-
signingScheme: {
76-
scheme: 'pss', //scheme
77-
hash: 'sha1', //hash using for scheme
78-
saltLength: 20 //salt length for pss sign
79-
}
80-
}
81-
```
82-
8366
This lib supporting next hash algorithms: `'md5'`, `'ripemd160'`, `'sha1'`, `'sha256'`, `'sha512'` in browser and node environment and additional `'md4'`, `'sha'`, `'sha224'`, `'sha384'` in node only.
8467

68+
<sub>Some [advanced options info](https://github.com/rzcoder/node-rsa/wiki/Advanced-options)</sub>
69+
8570
#### Creating "empty" key
8671
```javascript
8772
var key = new NodeRSA();
8873
```
8974

90-
#### Generate new key 512bit-length and with public exponent 65537
75+
#### Generate new 512bit-length key
9176
```javascript
9277
var key = new NodeRSA({b: 512});
9378
```
@@ -228,8 +213,7 @@ Questions, comments, bug reports, and pull requests are all welcome.
228213
* Added `.encryptPrivate()` and `.decryptPublic()` methods
229214
* Encrypt/decrypt methods in nodejs 0.12.x and io.js using native implementation (40x speed boost)
230215
* **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
216+
* `encryptPrivate` and `decryptPublic` don't have native implementation in nodejs and can't be use in native implementation with pkcs1_oaep padding in io.js
233217

234218
### 0.2.10
235219
* **Methods `.exportPrivate()` and `.exportPublic()` was replaced by `.exportKey([format])`.**

src/encryptEngines/io.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = function (keyPair, options) {
1111
padding = constants.RSA_PKCS1_PADDING;
1212
}
1313

14-
/* io.js 1.3.x bug */
14+
/* opennssl can't make it */
1515
if (padding === constants.RSA_PKCS1_OAEP_PADDING) {
1616
return jsEngine.encrypt(buffer, usePrivate);
1717
}
@@ -35,7 +35,7 @@ module.exports = function (keyPair, options) {
3535
padding = constants.RSA_PKCS1_PADDING;
3636
}
3737

38-
/* io.js 1.3.x bug */
38+
/* opennssl can't make it */
3939
if (padding === constants.RSA_PKCS1_OAEP_PADDING) {
4040
return jsEngine.decrypt(buffer, usePrivate);
4141
}

0 commit comments

Comments
 (0)