17 lines
454 B
Bash
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"
|
|
}
|