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
Copy file name to clipboardExpand all lines: README.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,8 +94,8 @@ Also you can use next method:
94
94
```javascript
95
95
key.generateKeyPair([bits], [exp]);
96
96
```
97
-
**bits** — `{int}` — key size in bits. 2048 by default.
98
-
**exp** — `{int}` — public exponent. 65537 by default.
97
+
***bits** — `{int}` — key size in bits. 2048 by default.
98
+
***exp** — `{int}` — public exponent. 65537 by default.
99
99
100
100
#### Load key from PEM string
101
101
@@ -116,8 +116,8 @@ var key = new NodeRSA('-----BEGIN RSA PRIVATE KEY-----\n'+
116
116
key.importKey(keyData, [format]);
117
117
key.exportKey([format]);
118
118
```
119
-
**keyData** — `{string|buffer}` — key in PEM string **or** Buffer contains PEM string **or** Buffer contains DER encoded data.
120
-
**format** — `{string}` — format id for export/import.
119
+
***keyData** — `{string|buffer}` — key in PEM string **or** Buffer contains PEM string **or** Buffer contains DER encoded data.
120
+
***format** — `{string}` — format id for export/import.
121
121
122
122
#### Format string syntax
123
123
Format string composed of several parts: `scheme-[key_type]-[output_type]`
@@ -129,7 +129,7 @@ Format string composed of several parts: `scheme-[key_type]-[output_type]`
129
129
*`'pem'` — Base64 encoded string with header and footer. Used by default.
130
130
*`'der'` — Binary encoded key data.
131
131
132
-
**Notice:** For import, if *keyData* is pem string or buffer containing string, you can do not specify format, but if you provide *keyData* as DER you must specify it in format string.
132
+
**Notice:** For import, if *keyData* is PEM string or buffer containing string, you can do not specify format, but if you provide *keyData* as DER you must specify it in format string.
133
133
134
134
**Shortcuts and examples**
135
135
*`'private'` or `'pkcs1'` or `'pkcs1-private'` == `'pkcs1-private-pem'` — private key encoded in pcks1 scheme as pem string.
@@ -147,7 +147,6 @@ var publicDer = key.exportKey('pkcs8-public-der');
0 commit comments