aboutsummaryrefslogtreecommitdiff
path: root/cryptfs/openssl_aead.go
diff options
context:
space:
mode:
Diffstat (limited to 'cryptfs/openssl_aead.go')
-rw-r--r--cryptfs/openssl_aead.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cryptfs/openssl_aead.go b/cryptfs/openssl_aead.go
index c70bd1f..5d38d38 100644
--- a/cryptfs/openssl_aead.go
+++ b/cryptfs/openssl_aead.go
@@ -7,6 +7,7 @@ import (
"github.com/spacemonkeygo/openssl"
)
+// Supports all nonce sizes
type opensslGCM struct {
key []byte
}
@@ -16,13 +17,13 @@ func (be opensslGCM) Overhead() int {
}
func (be opensslGCM) NonceSize() int {
- return NONCE_LEN
+ // We support any nonce size
+ return -1
}
// Seal encrypts and authenticates plaintext, authenticates the
// additional data and appends the result to dst, returning the updated
-// slice. The nonce must be NonceSize() bytes long and unique for all
-// time, for a given key.
+// slice. opensslGCM supports any nonce size.
func (be opensslGCM) Seal(dst, nonce, plaintext, data []byte) []byte {
// Preallocate output buffer