diff options
author | sina <sina@snix.ir> | 2022-07-30 19:04:32 +0430 |
---|---|---|
committer | sina <sina@snix.ir> | 2022-07-30 19:04:32 +0430 |
commit | 106aa62c63960c7931e4f811923250e9f4e48f8b (patch) | |
tree | aba0877860baa6bdb8bf9f7834203820f6bd6d1e /cipher.go | |
parent | 4caa361dfd77f64b5ea87703069544d51ea66387 (diff) |
overlaps
Diffstat (limited to 'cipher.go')
-rw-r--r-- | cipher.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |