aboutsummaryrefslogtreecommitdiff
path: root/internal/stupidgcm/without_openssl.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-09-04 11:58:43 +0200
committerJakob Unterwurzacher2021-09-07 18:14:05 +0200
commit8f820c429d88f601ba6c7a614fef23b7f53eb489 (patch)
tree551b80295c4dd773a785dd008fe90dee2c90332a /internal/stupidgcm/without_openssl.go
parentc9728247edb4cb29755908629528b22c8419a11d (diff)
stupidgcm: fix without_openssl build
$ ./build-without-openssl.bash internal/speed/speed.go:152:14: undefined: stupidgcm.NewXchacha20poly1305
Diffstat (limited to 'internal/stupidgcm/without_openssl.go')
-rw-r--r--internal/stupidgcm/without_openssl.go28
1 files changed, 5 insertions, 23 deletions
diff --git a/internal/stupidgcm/without_openssl.go b/internal/stupidgcm/without_openssl.go
index 4a14e73..81bae07 100644
--- a/internal/stupidgcm/without_openssl.go
+++ b/internal/stupidgcm/without_openssl.go
@@ -6,6 +6,8 @@ import (
"fmt"
"os"
+ "crypto/cipher"
+
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
)
@@ -21,32 +23,12 @@ func errExit() {
os.Exit(exitcodes.OpenSSL)
}
-func New(_ []byte, _ bool) *StupidGCM {
- errExit()
- // Never reached
- return &StupidGCM{}
-}
-
-func (g *StupidGCM) NonceSize() int {
- errExit()
- return -1
-}
-
-func (g *StupidGCM) Overhead() int {
- errExit()
- return -1
-}
-
-func (g *StupidGCM) Seal(_, _, _, _ []byte) []byte {
+func New(_ []byte, _ bool) cipher.AEAD {
errExit()
return nil
}
-func (g *StupidGCM) Open(_, _, _, _ []byte) ([]byte, error) {
- errExit()
- return nil, nil
-}
-
-func (g *StupidGCM) Wipe() {
+func NewXchacha20poly1305(_ []byte) cipher.AEAD {
errExit()
+ return nil
}