aboutsummaryrefslogtreecommitdiff
path: root/cipher.go
diff options
context:
space:
mode:
authorsina <sina@snix.ir>2022-07-30 19:04:32 +0430
committersina <sina@snix.ir>2022-07-30 19:04:32 +0430
commit106aa62c63960c7931e4f811923250e9f4e48f8b (patch)
treeaba0877860baa6bdb8bf9f7834203820f6bd6d1e /cipher.go
parent4caa361dfd77f64b5ea87703069544d51ea66387 (diff)
overlaps
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