Skip to content

Commit 435906c

Browse files
committed
fix: change expected mac size to 32
1 parent ffe1018 commit 435906c

File tree

1 file changed

+2
-2
lines changed
  • cipher/src/algorithm/poly1305

1 file changed

+2
-2
lines changed

cipher/src/algorithm/poly1305/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ impl From<Vec<u8>> for SignedEnvelope {
182182

183183
// Deserialize MAC
184184
offset += data_len;
185-
let mac = bytes[offset..offset + 16].to_vec();
185+
let mac = bytes[offset..offset + 32].to_vec();
186186

187187
// If the MAC length is not 16, return an error
188-
if mac.len() != 16 {
188+
if mac.len() != 32 {
189189
panic!("Unexpected bytes length");
190190
}
191191

0 commit comments

Comments
 (0)