From 7e0fefe970b98be7e455f671dbd0e994abd52110 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 17 Feb 2018 15:02:01 +0100 Subject: stupidgcm: switch to pointer receivers What the key slice does not get copied around will make it possible to check if the key has been wiped. --- internal/stupidgcm/without_openssl.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'internal/stupidgcm/without_openssl.go') diff --git a/internal/stupidgcm/without_openssl.go b/internal/stupidgcm/without_openssl.go index efd37f3..0c1c149 100644 --- a/internal/stupidgcm/without_openssl.go +++ b/internal/stupidgcm/without_openssl.go @@ -21,28 +21,28 @@ func errExit() { os.Exit(exitcodes.OpenSSL) } -func New(_ []byte, _ bool) stupidGCM { +func New(_ []byte, _ bool) *stupidGCM { errExit() // Never reached - return stupidGCM{} + return &stupidGCM{} } -func (g stupidGCM) NonceSize() int { +func (g *stupidGCM) NonceSize() int { errExit() return -1 } -func (g stupidGCM) Overhead() int { +func (g *stupidGCM) Overhead() int { errExit() return -1 } -func (g stupidGCM) Seal(_, _, _, _ []byte) []byte { +func (g *stupidGCM) Seal(_, _, _, _ []byte) []byte { errExit() return nil } -func (g stupidGCM) Open(_, _, _, _ []byte) ([]byte, error) { +func (g *stupidGCM) Open(_, _, _, _ []byte) ([]byte, error) { errExit() return nil, nil } -- cgit v1.2.3