JSPM

  • Created
  • Published
  • Downloads 563
  • Score
    100M100P100Q96068F
  • License GPL-2.0

File-based encryption utility for Node.js

Package Exports

  • cryptify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cryptify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cryptify

File-based encryption (FBE) with Node.js

Installation

  • $ npm i -g cryptify@latest

Usage

Cryptify v1.1.6 File-based Encryption Utility
https://www.npmjs.com/package/cryptify
Implements Node.js Crypto (https://nodejs.org/api/crypto.html)

Usage:
   cryptify (<file>... (-p '<password>') (command) [options] | [other])
   cryptify ./configuration.props -p mySecretKey -e -c aes-256-cbc
   cryptify ./foo.json ./bar.json -p mySecretKey --decrypt --log
   cryptify --version

Required Commands:
   -e --encrypt              Encrypt the file(s)
   -d --decrypt              Decrypt the file(s)

Required Arguments:
   -p --password             Cryptographic key

Optional Arguments:
   -c --cipher <algorithm>   Cipher algorithm (Default: aes-256-cbc-hmac-sha256)
   -k --keep                 Keep the original file(s)
   -l --log                  Log verbose
   -h --help                 Show this menu
   -v --version              Show version

Password Requirements:
   1) Minimum length: 8 characters
   2) Must contain at least 1 special character
   3) Must contain at least 1 numeric character
   4) Must contain a combination of uppercase and lowercase

Recommendations

Strongly consider clearing your shell's session history of any sensitive information.

Bash

Bash writes the current session history to disk (~/.bash_history) at the end of the session.

  1. Tactical Approach: Clear a specific entry in the current session

     $ history
     666 cryptify --help
     667 cryptify ./myfile.txt -e -p mySecretKey
     $ history -d 667
     $ history -w
  2. Blunt Approach: Clear the entire current session history (in memory)

     $ history -c
  3. Nuclear Approach: Clear current and existing session history (in memory, and on disk)

     $ rm $HISTFILE
     $ history -c
     $ exit
     (open shell)
     $ cat $HISTFILE
     exit

Windows Command Prompt

Windows does not store history between command prompt sessions.

  1. However, for safety, consider decreasing the Buffer Size and Number of Buffers in the Properties menu before use.

  2. Per this configuration, Windows will only store the last command in the buffer.

  3. Once work with cryptify is complete, close the command prompt:

     C:\Users\[user]> cryptify ./myfile.txt -e -p mySecretKey
     C:\Users\[user]> exit

Windows PowerShell

  1. PowerShell's Clear-History command doesn't seem to work as advertised, which is designed to clear the current session's history.

  2. However, deleting the file PowerShell's history does do the trick.

     PS C:\Users\[user]> cryptify ./myfile.txt -e -p mySecretKey
     PS C:\Users\[user]> del (Get-PSReadlineOption).HistorySavePath
     PS C:\Users\[user]> exit