aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-01-28 20:22:52 +0800
committerAaron LI <aly@aaronly.me>2018-01-28 20:22:52 +0800
commit25128414d352a209c3e00969bc0bbde601571756 (patch)
tree0b5715802295fb6d0bf1038b75045517f461146f
parent926b514d2e77c2676c4ced560d25cddccd427c85 (diff)
downloadatoolbox-25128414d352a209c3e00969bc0bbde601571756.tar.bz2
Add cli/gpg-aes256.sh
-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}"