typo 6553 -> 65537

This commit is contained in:
AJ ONeal 2016-07-30 16:04:57 -04:00
parent 0ebedd4e74
commit 6c084e6b48
1 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ var PromiseA = require('bluebird');
var RSA = PromiseA.promisify(require('rsa-compat').RSA); var RSA = PromiseA.promisify(require('rsa-compat').RSA);
var bitlen = 1024; var bitlen = 1024;
var exp = 6553; var exp = 65537;
var options = { public: true, pem: true, internal: true }; var options = { public: true, pem: true, internal: true };
RSA.generateKeypair(bitlen, exp, options).then(function (keypair) { RSA.generateKeypair(bitlen, exp, options).then(function (keypair) {
@ -34,7 +34,7 @@ RSA.generateKeypair(bitlen, exp, options).then(function (keypair) {
, privateKeyJwk: { , privateKeyJwk: {
kty: "RSA" kty: "RSA"
, n: '/*base64 modulus n = pq*/' , n: '/*base64 modulus n = pq*/'
, e: '/*base64 exponent (usually 6553)*/' , e: '/*base64 exponent (usually 65537)*/'
, d: '/*base64 private exponent (d = e^1 (mod ϕ(n))/' , d: '/*base64 private exponent (d = e^1 (mod ϕ(n))/'
, p: '/*base64 first prime*/' , p: '/*base64 first prime*/'
, q: /*base64 second prime*/ , q: /*base64 second prime*/
@ -45,7 +45,7 @@ RSA.generateKeypair(bitlen, exp, options).then(function (keypair) {
, publicKeyJwk: { , publicKeyJwk: {
kty: "RSA" kty: "RSA"
, n: /*base64 modulus n = pq*/ , n: /*base64 modulus n = pq*/
, e: /base64 exponent (usually 6553)*/ , e: /base64 exponent (usually 65537)*/
} }
, _ursa: /*undefined or intermediate ursa object*/ , _ursa: /*undefined or intermediate ursa object*/
, _forge: /*undefined or intermediate forge object*/ , _forge: /*undefined or intermediate forge object*/
@ -68,12 +68,12 @@ Create a private keypair and export it as PEM, JWK, and/or internal formats
```javascript ```javascript
RSA.generateKeypair(null, null, null, function (keypair) { /*...*/ }); RSA.generateKeypair(null, null, null, function (keypair) { /*...*/ });
RSA.generateKeypair(1024, 6553, { pem: false, public: false, internal: false }, function (keypair) { /*...*/ }); RSA.generateKeypair(1024, 65537, { pem: false, public: false, internal: false }, function (keypair) { /*...*/ });
``` ```
`bitlen`: *1024* (default), 2048, or 4096 `bitlen`: *1024* (default), 2048, or 4096
`exp`: *6553* (default) `exp`: *65537* (default)
`options`: `options`:
```javascript ```javascript