File tree 5 files changed +9
-9
lines changed
5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1451,7 +1451,7 @@ __Examples__
1451
1451
1452
1452
``` js
1453
1453
// generate a key pair
1454
- var keys = forge .pki .rsa .generateKeyPair (1024 );
1454
+ var keys = forge .pki .rsa .generateKeyPair (2048 );
1455
1455
1456
1456
// create a certification request (CSR)
1457
1457
var csr = forge .pki .createCertificationRequest ();
Original file line number Diff line number Diff line change 1
1
var forge = require ( '..' ) ;
2
2
3
- console . log ( 'Generating 1024 -bit key-pair...' ) ;
4
- var keys = forge . pki . rsa . generateKeyPair ( 1024 ) ;
3
+ console . log ( 'Generating 2048 -bit key-pair...' ) ;
4
+ var keys = forge . pki . rsa . generateKeyPair ( 2048 ) ;
5
5
console . log ( 'Key-pair created.' ) ;
6
6
7
7
console . log ( 'Creating self-signed certificate...' ) ;
Original file line number Diff line number Diff line change 1
1
var forge = require ( '..' ) ;
2
2
3
- console . log ( 'Generating 1024 -bit key-pair...' ) ;
4
- var keys = forge . pki . rsa . generateKeyPair ( 1024 ) ;
3
+ console . log ( 'Generating 2048 -bit key-pair...' ) ;
4
+ var keys = forge . pki . rsa . generateKeyPair ( 2048 ) ;
5
5
console . log ( 'Key-pair created.' ) ;
6
6
7
7
console . log ( 'Creating certification request (CSR) ...' ) ;
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ var forge = require('..');
2
2
3
3
try {
4
4
// generate a keypair
5
- console . log ( 'Generating 1024 -bit key-pair...' ) ;
6
- var keys = forge . pki . rsa . generateKeyPair ( 1024 ) ;
5
+ console . log ( 'Generating 2048 -bit key-pair...' ) ;
6
+ var keys = forge . pki . rsa . generateKeyPair ( 2048 ) ;
7
7
console . log ( 'Key-pair created.' ) ;
8
8
9
9
// create a certificate
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ function createSigner(name) {
42
42
console . log ( 'Creating signer "' + name + '"...' ) ;
43
43
44
44
// generate a keypair
45
- console . log ( 'Generating 1024 -bit key-pair...' ) ;
46
- var keys = forge . pki . rsa . generateKeyPair ( 1024 ) ;
45
+ console . log ( 'Generating 2048 -bit key-pair...' ) ;
46
+ var keys = forge . pki . rsa . generateKeyPair ( 2048 ) ;
47
47
console . log ( 'Key-pair created:' ) ;
48
48
console . log ( forge . pki . privateKeyToPem ( keys . privateKey ) ) ;
49
49
console . log ( forge . pki . publicKeyToPem ( keys . publicKey ) ) ;
You can’t perform that action at this time.
0 commit comments