jets: add comment explaining length matching

This commit is contained in:
Matthew LeVan 2024-01-08 18:18:04 -05:00
parent 824e6cf7e9
commit 1a323204e3

View File

@ -183,6 +183,8 @@ mod util {
let (mut iv, iv_bytes) = IndirectAtom::new_raw_mut_bytearray::<16, NockStack>(stack);
// We match on length here and elsewhere where a similar pattern is followed
// to avoid panicking when a zero length is passed to IndirectAtom::new_raw_mut_bytes.
match txt_len {
0 => {
ac_aes_siv_en::<N>(key, &mut [], siv_data, iv_bytes, &mut [0u8; 0]).unwrap();