Last active
February 2, 2021 07:16
-
-
Save yowcow/d45333b7fac5e977b7d4e35bb111df5e to your computer and use it in GitHub Desktop.
GPG encrypt/decrypt/sign/verify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RECIPIENT := yowcow@x19.dev | |
| all: | |
| encrypt: _output/encrypted.txt.gpg.asc | |
| decrypt: _output/decrypted.txt | |
| sign: _output/message.txt.sig.asc | |
| verify: _output/message.txt.sig.asc | |
| gpg --verify $< message.txt | |
| _output/encrypted.txt.gpg.asc: message.txt | |
| mkdir -p $(dir $@) | |
| gpg --output $@ --encrypt -a --recipient $(RECIPIENT) $< | |
| _output/message.txt.sig.asc: message.txt | |
| mkdir -p $(dir $@) | |
| gpg --output $@ --detach-sig -a $< | |
| _output/decrypted.txt: _output/encrypted.txt.gpg.asc | |
| mkdir -p $(dir $@) | |
| gpg --output $@ --decrypt $< | |
| clean: | |
| rm -rf _output | |
| .PHONY: all encrypt decrypt sign clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment