1
0
Fork 0
mirror of https://github.com/sbrl/bin.git synced 2018-01-10 21:33:46 +00:00
bin/encrypt

20 lines
449 B
Text
Raw Normal View History

2015-12-11 10:29:22 +00:00
#!/usr/bin/env bash
##########################
# File encryption script #
##########################
# Written by Starbeamrainbowlabs
# Uses openssl to symmetrically encrypt a file.
read -s -p "Password: " password
echo
read -s -p "Retype Password: " retypepassword
echo
if [ "$password" == "$retypepassword" ];then
openssl enc -in "$1" -out "$1.aes" -e -aes256 -k "$password"
echo Encrypted with aes
else
echo Passwords didn\'t match! >&2
fi