pub mod partitioned_sec_buffer;
pub mod sec_bytes;
pub mod sec_packet;
pub(crate) fn const_time_compare(this: &[u8], other: &[u8]) -> bool {
let mut count = 0;
let this_len = this.len();
for idx in 0..this_len {
let val_this = this.get(idx);
let val_other = other.get(idx);
match (val_this, val_other) {
(Some(a), Some(b)) => count += (a == b) as usize,
_ => {
let _ = std::hint::black_box(count);
}
}
}
count == this.len() && count == other.len()
}