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