aboutsummaryrefslogtreecommitdiff
path: root/gpg
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2017-10-02 14:26:26 +0200
committerLaria Carolin Chabowski <laria@laria.me>2017-10-03 15:01:38 +0200
commitdb0c023fd0d756912c3f575c6ac65e99fda573cc (patch)
treef5e507c519f591e401fbb46bb77118d252b37612 /gpg
parent7f0771d0a9caf2d3294bfced9e66fac03334d9ba (diff)
downloadpetrific-db0c023fd0d756912c3f575c6ac65e99fda573cc.tar.gz
petrific-db0c023fd0d756912c3f575c6ac65e99fda573cc.tar.bz2
petrific-db0c023fd0d756912c3f575c6ac65e99fda573cc.zip
Add filter storage method
Also remove de/encryption in cloud storage, can be provided with a filter storage
Diffstat (limited to 'gpg')
-rw-r--r--gpg/gpg.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/gpg/gpg.go b/gpg/gpg.go
index 1ab71ec..cb62f32 100644
--- a/gpg/gpg.go
+++ b/gpg/gpg.go
@@ -36,24 +36,3 @@ func (Verifyer) Verify(b []byte) error {
cmd.Stdin = bytes.NewReader(b)
return cmd.Run()
}
-
-type Encrypter struct {
- Key string
-}
-
-func (e Encrypter) Encrypt(b []byte) ([]byte, error) {
- cmd := exec.Command("gpg", "--encrypt", "--recipient", e.Key)
- return filter(cmd, b)
-}
-
-type Decrypter struct{}
-
-func (Decrypter) Decrypt(b []byte) ([]byte, error) {
- cmd := exec.Command("gpg", "--decrypt")
- return filter(cmd, b)
-}
-
-type Crypter struct {
- Encrypter
- Decrypter
-}