fn calculate_dense_hash(spare_hash: &Vec<u32>) -> Vec<u32> {
    let mut dense_hash: Vec<u32> = Vec::new();

    let mut sp = spare_hash.clone();
    for _ in 0..16 {
        let remainder = sp.split_off(16);
        let k = sp.pop().unwrap();
        let result = sp.iter().fold(k, |acc, &x| acc ^ x);
        dense_hash.push(result);
        sp = remainder;
    }

    dense_hash
}
// Assuming spare hash has 256 elements
Assuming spare hash has 256 elements
Assuming spare hash has 256 elements
fn calculate_dense_hash(spare_hash: &Vec<u32>) -> Vec<u32> {
    let mut dense_hash: Vec<u32> = Vec::new();
    let mut sp = spare_hash.clone();
    for _ in 0..16 {
        let remainder = sp.split_off(16);
        let k = sp.pop().unwrap();
        let result = sp.iter().fold(k, |acc, &x| acc ^ x);
        dense_hash.push(result);
        sp = remainder;
    }
    dense_hash
}
fn calculate_dense_hash ( spare_hash : & Vec < u32 > ) -> Vec < u32 > { let mut dense_hash : Vec < u32 > = Vec :: new ( ) ; let mut sp = spare_hash . clone ( ) ; for _ in 0 .. 16 { let remainder = sp . split_off ( 16 ) ; let k = sp . pop ( ) . unwrap ( ) ; let result = sp . iter ( ) . fold ( k , | acc , & x | acc ^ x ) ; dense_hash . push ( result ) ; sp = remainder ; } dense_hash }
Assuming spare hash has 256 elements
Assuming spare hash has 256 elements
spare_hash
&Vec<u32>