Skip to content

Scripts for encrypting and decrypting a dir of folders

Notifications You must be signed in to change notification settings

opencollective/encrypt_dir

Repository files navigation

Encrypt + Decrypt a directory of files

Uses the tweetnacl library to encrypt / decrypt files in a directory.

Setup

clone this repo and run

npm install
mkdir files_to_encrypt
mkdir files_to_decrypt

Generate a key

$ node generateKey.js

!!Warning!!

Store this key somewhere sensible. If you lose the key, you can't decrypt your files. Fair warning.

Encrypt files

Copy the files you want to encrypt into the files_to_encrypt folder.

Use your key to encrypt the files.

KEY=K6RchRUGO0FmWOyqBzCWMjaFPRs0D3undo46wrmrVdM= node encryptDir.js

Encrypted files are in the folder with an .encrypted suffix.

Decrypt files

Copy the files you want to decrypt into the files_to_decrypt folder.

Use your key to decrypt the files.

KEY=K6RchRUGO0FmWOyqBzCWMjaFPRs0D3undo46wrmrVdM= node decryptDir.js

Decrypted files are in the folder without an .encrypted suffix.

About

Scripts for encrypting and decrypting a dir of folders

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published