blob: 3a141d84e4780af659c04be126c748e6b0617edf [file]
// Copyright 2026 The Fuchsia Authors
//
// Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
// <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
// license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
// This file may not be copied, modified, or distributed except according to
// those terms.
//! Spine comparison and 4-way differential verdict classification.
use super::*;
mod four_way;
mod spines;
mod verdict;
pub use self::{
four_way::{classify_four_way, classify_four_way_with_ub_guard, compare_ub_fault_results},
spines::{compare_spines, normalize_unwind_reason},
verdict::TraceVerdict,
};
/// Compute lowercase 64-char SHA-256 hex digest of `bytes`.
pub fn sha256_hex(bytes: &[u8]) -> String {
let digest = Sha256::digest(bytes);
let mut hex = String::with_capacity(64);
for b in digest {
let _ = write!(hex, "{b:02x}");
}
hex
}