aboutsummaryrefslogtreecommitdiff
path: root/cipher.go
diff options
context:
space:
mode:
Diffstat (limited to 'cipher.go')
-rw-r--r--cipher.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cipher.go b/cipher.go
index 89441c3..278172d 100644
--- a/cipher.go
+++ b/cipher.go
@@ -44,8 +44,8 @@ func (c *rabbitPoly1305) NonceSize() int { return c.noncesize }
func (c *rabbitPoly1305) sealRabbit(dst, nonce, plaintext, ad []byte) []byte {
ret, out := headtail(dst, len(plaintext)+poly1305.TagSize)
ciphertext, tag := out[:len(plaintext)], out[len(plaintext):]
- if inexactOverlap(out, plaintext) {
- panic("rabaead: invalid buffer memory overlap") //should never happen
+ if rabbitio.InexactOverlap(out, plaintext) {
+ panic("rabaead: invalid buffer memory overlap")
}
var polyKey [polykeylen]byte
@@ -91,8 +91,8 @@ func (c *rabbitPoly1305) openRabbit(dst, nonce, ciphertext, ad []byte) ([]byte,
writeUint64(p, len(ciphertext))
ret, out := headtail(dst, len(ciphertext))
- if inexactOverlap(out, ciphertext) {
- panic("rabaead: invalid buffer memory overlap") //should never happen
+ if rabbitio.InexactOverlap(out, ciphertext) {
+ panic("rabaead: invalid buffer memory overlap")
}
// check data integrity

Snix LLC Git Repository Holder Copyright(C) 2022 All Rights Reserved Email To Snix.IR