Files
vns/src/includes/libencryption.sh
2016-01-25 23:41:41 -06:00

16 lines
463 B
Bash

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