diff options
Diffstat (limited to 'internal/contentenc/content_api.go')
-rw-r--r-- | internal/contentenc/content_api.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/contentenc/content_api.go b/internal/contentenc/content_api.go index 4c6aa00..cf482b6 100644 --- a/internal/contentenc/content_api.go +++ b/internal/contentenc/content_api.go @@ -11,9 +11,9 @@ type ContentEnc struct { // Cryptographic primitives cryptoCore *cryptocore.CryptoCore // Plaintext block size - plainBS uint64 + plainBS uint64 // Ciphertext block size - cipherBS uint64 + cipherBS uint64 // All-zero block of size cipherBS, for fast compares allZeroBlock []byte } @@ -23,14 +23,13 @@ func New(cc *cryptocore.CryptoCore, plainBS uint64) *ContentEnc { cipherBS := plainBS + uint64(cc.IVLen) + cryptocore.AuthTagLen return &ContentEnc{ - cryptoCore: cc, - plainBS: plainBS, - cipherBS: cipherBS, + cryptoCore: cc, + plainBS: plainBS, + cipherBS: cipherBS, allZeroBlock: make([]byte, cipherBS), } } - func (be *ContentEnc) PlainBS() uint64 { return be.plainBS } |