aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcli/gpg-aes256.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/cli/gpg-aes256.sh b/cli/gpg-aes256.sh
new file mode 100755
index 0000000..9ce610b
--- /dev/null
+++ b/cli/gpg-aes256.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# Encrypt the given file using symmetric AES256 algorithm.
+#
+# Aaron LI
+# 2015-01-24
+#
+
+case "$1" in
+ ""|-h|--help)
+ echo "usage: ${0##*/} <infile>"
+ exit 1
+ ;;
+esac
+
+infile="$1"
+outfile="${infile}.gpg"
+gpg2 --symmetric --cipher-algo aes256 -o "${outfile}" "${infile}"
+chmod 0600 "${outfile}"