mirror of
https://github.com/sbrl/bin.git
synced 2018-01-10 21:33:46 +00:00
19 lines
449 B
Bash
Executable file
19 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
|