From 73cb4c217ff945a0e9591d85c33bf67090b251d0 Mon Sep 17 00:00:00 2001 From: Maxime Thoonsen Date: Mon, 14 May 2018 17:50:34 +0300 Subject: [PATCH] add documentation to import public key from modulus and exponent --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index a17c555..c3ab061 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,14 @@ console.log(publicComponents); */ ``` +If you want to only import the public key use `'components-public'` as an option: +```javascript +key.importKey({ + n: new Buffer('0086fa9ba066685845fc03833a9699c8baefb53cfbf19052a7f10f1eaa30488cec1ceb752bdff2df9fad6c64b3498956e7dbab4035b4823c99a44cc57088a23783', 'hex'), + e: 65537, +}, 'components-public'); +``` ### Properties