Skip to content

Instantly share code, notes, and snippets.

View sdavidsson90's full-sized avatar
🐧

Sighvatur Davidsson sdavidsson90

🐧
  • Aalborg University
  • Aalborg, Denmark
View GitHub Profile
@michaelbutler
michaelbutler / decrypt_file.sh
Last active October 25, 2025 12:08
Bash/shell script to Encrypt and Decrypt an arbitrary file using a passphrase
#!/bin/sh
set -e
# Required ENV variable: ENC_PASSPHRASE
# Usage: ENC_PASSPHRASE=my_super_long_ascii_pass_phrase123 ./decrypt_file.sh encrypted.enc secretfile.json
if [ -z "$ENC_PASSPHRASE" ]; then
echo "ERROR: Required ENC_PASSPHRASE environment variable NOT passed in."
exit 1