Skip to content

Commit 884f98f

Browse files
authored
Merge pull request #113 from MaximeThoonsen/master
add documentation to import public key from modulus and exponent
2 parents 1bc6f8d + 73cb4c2 commit 884f98f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,14 @@ console.log(publicComponents);
165165
*/
166166
```
167167

168+
If you want to only import the public key use `'components-public'` as an option:
168169

170+
```javascript
171+
key.importKey({
172+
n: new Buffer('0086fa9ba066685845fc03833a9699c8baefb53cfbf19052a7f10f1eaa30488cec1ceb752bdff2df9fad6c64b3498956e7dbab4035b4823c99a44cc57088a23783', 'hex'),
173+
e: 65537,
174+
}, 'components-public');
175+
```
169176

170177
### Properties
171178

0 commit comments

Comments
 (0)