From cd7a90facd52a2921d82e0abae93535109e09a5e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 5 Feb 2026 00:20:14 -0600 Subject: feat(dotfiles): add GPG symmetric encryption scripts encryptfile: encrypt file with AES256, prompt to delete original decryptfile: decrypt to clipboard (wl-copy for Wayland, xclip for X11) --- dotfiles/common/.local/bin/encryptfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 dotfiles/common/.local/bin/encryptfile (limited to 'dotfiles/common/.local/bin/encryptfile') diff --git a/dotfiles/common/.local/bin/encryptfile b/dotfiles/common/.local/bin/encryptfile new file mode 100755 index 0000000..bfe5aee --- /dev/null +++ b/dotfiles/common/.local/bin/encryptfile @@ -0,0 +1,17 @@ +#!/bin/bash +# Encrypt a file with symmetric GPG (password-based) +# Usage: encryptfile + +if [ -z "$1" ]; then + echo "Usage: encryptfile " + exit 1 +fi + +if [ ! -f "$1" ]; then + echo "File not found: $1" + exit 1 +fi + +gpg --symmetric --cipher-algo AES256 --armor -o "${1}.gpg" "$1" && \ + echo "Encrypted to ${1}.gpg" && \ + rm -i "$1" -- cgit v1.2.3