Skip to content
This repository has been archived by the owner on Jul 10, 2019. It is now read-only.
/ bashcrypto Public archive

Bash script to encrypt and decrypt files

Notifications You must be signed in to change notification settings

schulh/bashcrypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

bashcrypto

Usage

Options

Usage: bashcrypt [OPTION] -i INPUT -o OUTPUT
-p	use public/privatekey for encryption/decryption
-e	encrypt
-d	decrypt
-i	input
-o	output
-s	create shasum
-t  tarmode
-h	help message

Create public/private key

# Create public/private key
openssl req -x509 -nodes -newkey rsa:4096 -keyout privatekey.pem -out publickey.pem
# Create public/private key with password protection
openssl req -x509 -newkey rsa:4096 -keyout privatekey.pem -out publickey.pem

Encrypt

# encrypt with a password:
./bashcrypto -e -i test.txt -o test.txt.enc
# encrypt all files in a folder
./bashcrypto -e -i dir -o enc
# encrypt with your public key:
./bashcrypto -e -p public.pem -i test.txt -o ultrasecret.dat
# encrypt all files in a folder
./bashcrypto -e -p public.pem -i dir -o ultrasecret.dat

Decrypt

# decrypt with password:
./bashcrypto -d -i test.txt.enc -o plain.txt
# decrypt with private key:
./bashcrypto -d -p private.pem -i ultrasecret.dat -o plain.txt

To-Do

  • ?