oxabl-cache-crypto 0.2.0

Client-side cryptography for the oxabl-cache remote compile cache: key hierarchy, seal and open, signatures.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Lookup ids: the keyed hash of a compile key.

use oxabl_cache_format::LookupId;

use crate::keys::LookupKey;

impl LookupKey {
    /// `BLAKE3.keyed_hash(lookup_key, compile_key)`.
    pub fn lookup_id(&self, compile_key: &[u8; 32]) -> LookupId {
        LookupId(blake3::keyed_hash(self.bytes(), compile_key).into())
    }
}