From db0c023fd0d756912c3f575c6ac65e99fda573cc Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Mon, 2 Oct 2017 14:26:26 +0200 Subject: Add filter storage method Also remove de/encryption in cloud storage, can be provided with a filter storage --- gpg/gpg.go | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'gpg') 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 -} -- cgit v1.2.3-70-g09d2