1.0.2 • Published 4 years ago

zv-keychain v1.0.2

Weekly downloads
5
License
ISC
Repository
github
Last release
4 years ago

zv-keychain

Encrypt/decrypt passwords (or anything) then store/retrieve them from local storage (via Command Line Interface).
Makes use of node built-in crypto package.

Usage

  1. If installed via NPM, just require it from the main (e.g. app.js) script:
require( 'zv-keychain' );
  • If cloned from github, install dependency (zv-load.env)
cd <PATH TO zv-keychain>
npm install
  1. Create .env file and specify absolute path to keychain file (or any name preferred)
KEYCHAIN_PATH=<PATH TO THE FILE WHCH WILL SERVE AS KEYCHAIN>

e.g. KEYCHAIN_PATH=/Users/teamzv/Documents/.keychain
3. To encrypt, use --encrypt flag and provide name and (optional) account details

node app.js --encrypt <MNEMONIC_NAME> <PASSWORD_OR_ANY_TEXT> <OPTIONAL_DETAILS>

e.g. node app.js --encrypt myNameGoogle myNameGooglePassword myName@google.com
4. To decrypt, use --decrypt flag and provide name and the encrypted data, now decrypted, will be printed

node app.js --decrypt myNameGoogle
  1. To show stored keys, use --getNames flag to print all name of all keys stored and an optional name argument to filter result to those containing that name
node app.js --getNames
  1. With the getNames flag, an optional name argument may be used to filter result to those containing that name
node app.js --getNames myName

REMEMBER TO KEEP KEYCHAIN (FILE) SECURE & SAFE (!Important)