Files
vns/src/includes/libencryption.sh
2016-01-25 21:00:43 -06:00

17 lines
454 B
Bash

function encrypt(){
# This function, given a recipient, $PUBKEY; a file to encrypt, $TARGET; and an
# output file, "$NOTE", will encrypt $TARGET to $NOTE against $PUBKEY's private
# GPG key.
gpg -r "$PUBKEY" -o "$NOTE" -e "$TARGET"
}
function decrypt(){
# This function, given a recipient, $PUBKEY; a file to decrypt, $TARGET; and an
# output file, "$NOTE", will decrpyt $TARGET to $NOTE against $PUBKEY's private
# GPG key.
gpg -d "$NOTE"
}