Pārlūkot izejas kodu

output der as binstr, add comment

master
AJ ONeal pirms 5 gadiem
vecāks
revīzija
e8837a0721
  1. 2
      README.md
  2. 4
      bin/rasha.js

2
README.md

@ -32,7 +32,7 @@ Rasha.generate({ format: 'jwk' }).then(function (keypair) {
* `format` defaults to `'jwk'`
* `'pkcs1'` (traditional)
* `'pkcs8'`
* `'pkcs8'` <!-- * `'ssh'` -->
* `modulusLength` defaults to 2048 (must not be lower)
* generally you shouldn't pick a larger key size - they're slow
* **2048** is more than sufficient

4
bin/rasha.js

@ -20,6 +20,10 @@ if (-1 !== [ 'jwk', 'pem', 'json', 'der', 'pkcs1', 'pkcs8', 'spki' ].indexOf(inf
, modulusLength: parseInt(format, 10) || 2048
, encoding: parseInt(format, 10) ? null : format
}).then(function (key) {
if ('der' === infile || 'der' === format) {
key.private = key.private.toString('binary');
key.public = key.public.toString('binary');
}
console.log(key.private);
console.log(key.public);
}).catch(function (err) {

Notiek ielāde…
Atcelt
Saglabāt