Skip to main content

compute_dir_hash_from_s3_children

Function compute_dir_hash_from_s3_children 

Source
pub fn compute_dir_hash_from_s3_children(
    children: &mut Vec<(String, u64, String)>,
) -> [u8; 32]
Expand description

Compute a directory hash from S3 child metadata.

Each child is represented as (name, size_bytes, blake3_hex_or_etag). For CAS restores: blake3_hex_or_etag = the per-file BLAKE3 from the manifest. For plain S3: blake3_hex_or_etag = the S3 ETag (MD5 or multipart hash).

Child hash = BLAKE3(size_le8 ++ hash_str_bytes). Dir hash = compute_dir_hash(sorted children). Sort-order independent: children are sorted by name inside compute_dir_hash.