assemble_core/
fingerprint.rs

1//! Provides ways to "fingerprint" something
2
3pub const FINGER_PRINT_SIZE: usize = 32;
4
5pub trait Fingerprint<const FINGER_PRINT: usize = FINGER_PRINT_SIZE> {
6    fn fingerprint(&self) -> [u8; FINGER_PRINT];
7
8    fn matches_fingerprint(&self, other: &[u8]) -> bool {
9        self.fingerprint() == other
10    }
11}