PHP 7.4.33
Preview: decrypt_gnupg Size: 570 B
/usr/lib/cryptsetup/scripts/decrypt_gnupg
#!/bin/sh

decrypt_gpg () {
	echo "Performing GPG symmetric decryption ..." >&2
	if ! /lib/cryptsetup/askpass "Enter passphrase for key $1: " | \
		/usr/bin/gpg -q --batch --no-options  \
		--no-random-seed-file --no-default-keyring \
		--keyring /dev/null --secret-keyring /dev/null \
		--trustdb-name /dev/null --passphrase-fd 0 --decrypt -- "$1"; then
		return 1
	fi
	return 0
}

if [ ! -x /usr/bin/gpg ]; then
	echo "$0: /usr/bin/gpg is not available" >&2
	exit 1
fi

if [ -z "$1" ]; then
	echo "$0: missing key as argument" >&2
	exit 1
fi

decrypt_gpg "$1"
exit $?

Directory Contents

Dirs: 0 × Files: 7
Name Size Perms Modified Actions
1.08 KB lrwxr-xr-x 2022-01-13 21:44:36
Edit Download
570 B lrwxr-xr-x 2022-01-13 21:44:36
Edit Download
953 B lrwxr-xr-x 2022-01-13 21:44:36
Edit Download
1.99 KB lrwxr-xr-x 2022-01-13 21:44:36
Edit Download
1.36 KB lrwxr-xr-x 2022-01-13 21:44:36
Edit Download
347 B lrwxr-xr-x 2022-01-13 21:44:36
Edit Download
14.30 KB lrwxr-xr-x 2023-08-22 17:16:42
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).