Closed stevehodgkiss closed 7 years ago
Sorry to ask for yet another revision, but I think the API I'd actually like here is:
echo 1234deadbeefcafe | ejson decrypt --key-from-stdin secrets.ejson
Would that be suitable for your needs? I think it would only be ~4 lines more code.
IIn either case, I'd make it a local option, but I don't have an extremely strong opinion. --keydir
is global because it feels like it could be relevant to multiple commands, whereas passing a --private-key
is specifically modifying the operation of the decryption.
Yep, reading from stdin will work too. I prefer that approach actually.
Sorry for the huge delay, I got wrapped up in a project and ignored github for a bit. Looks good at a glance; I'll take a closer look and probably merge later today.
@burke no worries. I've addressed your feedback.
Removes the need to write the private key to decrypt an EJSON file.
Background: https://github.com/Shopify/ejson/pull/41