pub fn hash_pair(left: &[u8], right: &[u8]) -> [u8; 32] {
    let mut hasher = Sha256::new();
    hasher.update(left);
    hasher.update(right);
    let digest = hasher.finalize();
    let mut res = [0u8; 32];
    res.copy_from_slice(&digest);
    res
}
Hashes a pair of already hashed leaves.

The hash is computed as sha256(left || right).
examples/aggregation/program/src/main.rs