Skip to content

Commit 5bd1467

Browse files
committed
debug assert over nonce_tag len
1 parent c5e3474 commit 5bd1467

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/util/key_obfuscator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ impl KeyObfuscator {
6666
obfuscated_key_bytes.split_at(obfuscated_key_bytes.len() - TAG_LENGTH - NONCE_LENGTH - TAG_LENGTH);
6767
let (tag, remaining) = remaining.split_at(TAG_LENGTH);
6868
let (wrapped_nonce_bytes, wrapped_nonce_tag) = remaining.split_at(NONCE_LENGTH);
69+
debug_assert_eq!(wrapped_nonce_tag.len(), TAG_LENGTH);
6970

7071
// Unwrap wrapped_nonce to get nonce.
7172
let mut wrapped_nonce = [0u8; NONCE_LENGTH];

0 commit comments

Comments
 (0)