Skip to main content

oxabl_cache_crypto/
lookup.rs

1//! Lookup ids: the keyed hash of a compile key.
2
3use oxabl_cache_format::LookupId;
4
5use crate::keys::LookupKey;
6
7impl LookupKey {
8    /// `BLAKE3.keyed_hash(lookup_key, compile_key)`.
9    pub fn lookup_id(&self, compile_key: &[u8; 32]) -> LookupId {
10        LookupId(blake3::keyed_hash(self.bytes(), compile_key).into())
11    }
12}