From a0bda23683c3680851bc88d20c0182c17a3a1bef Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 13 Aug 2016 15:07:41 -0600 Subject: [PATCH] merge README.md --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fb42c3f..d257b6f 100644 --- a/README.md +++ b/README.md @@ -20,5 +20,22 @@ API * checkKeypair(opts, cb) * setKeypair(opts, keypair, cb) * check(opts, cb) - * set(opts, reg, cb) + * set(opts, certs, cb) ``` + +Keypairs +-------- + +For convenience, the keypair object will always contain **both** PEM and JWK +versions of the private and/or public keys when being passed to the `*Keypair` functions. + +**set** + +`setKeypair` will always be called with `email` and **all three** forms of the keypair: +`privateKeyPem`, `publicKeyPem`, and `privateKeyJwk`. It's easy to generate `publicKeyJwk` +from `privateKeyJwk` because it is just a copy of the public fields `e` and `n`. + +**check** + +`checkKeypair` may be called with any of `email`, `accountId`, and `keypair` - which will +contain only `publicKeyPem` and `publicKeyJwk`.