1
0
Fork 0
bin/encrypt

20 lines
449 B
Bash
Executable File

#!/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