Skip to content

Commit

Permalink
Add decryption command line tool
Browse files Browse the repository at this point in the history
We sometimes need to be able to view encrypted contents of the database.
This command line tools allows us to do this.

Usage:

> KEY=<encryption_key_here> node ~/ems_db/tools/decrpt.js
<encrypted_string>
  • Loading branch information
Andrew Isherwood committed Feb 5, 2021
1 parent 1df0c35 commit cceb997
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/decrypt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { decrypt } = require('../helpers/encryption');


(async () => {

const decrypted = await decrypt(process.argv[2]);
console.log(decrypted);

})();

0 comments on commit cceb997

Please sign in to comment.