Skip to content

Instantly share code, notes, and snippets.

@SharkyRawr
Last active November 30, 2019 21:18
Show Gist options
  • Save SharkyRawr/8aef24790589352f39a1f7233ca4eff5 to your computer and use it in GitHub Desktop.
Save SharkyRawr/8aef24790589352f39a1f7233ca4eff5 to your computer and use it in GitHub Desktop.
#! /bin/bash -e
export GPG_TTY=$(tty)
KEY=12CDBA2124EC19869892D6175C29252265360140
if [ ! -f "$1" ]; then
echo "Please specify a file!"
exit 1
fi
echo "$1"
FSIZE=`stat --printf="%s" "$1"`
dd if="$1" bs=1M | pv -s $FSIZE | gpg -s -e -u "$KEY" -r "$KEY" -z 0 > "$1.gpg"
gpg --decrypt "$1.gpg" > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment