zv-keychain
v1.0.2
Published
Encrypt/decrypt passwords (or anything) then store/retrieve them from your local storage (via Command Line Interface).
Downloads
23
Maintainers
Readme
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
- 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
- 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
- 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 [email protected]
- To decrypt, use --decrypt flag and provide name and the encrypted data, now decrypted, will be printed
node app.js --decrypt myNameGoogle
- 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
- With the getNames flag, an optional name argument may be used to filter result to those containing that name
node app.js --getNames myName