fn polymod(v: &Vec<u8>) -> u64 {
    let mut c: u64 = 1;
    for d in v.iter() {
        let c0: u8 = (c >> 35) as u8;
        c = ((c & 0x07ffffffff) << 5) ^ (*d as u64);
        if c0 & 0x01 != 0 {
            c = c ^ 0x98f2bc8e61;
        }
        if c0 & 0x02 != 0 {
            c = c ^ 0x79b76d99e2;
        }
        if c0 & 0x04 != 0 {
            c = c ^ 0xf33e5fb3c4;
        }
        if c0 & 0x08 != 0 {
            c = c ^ 0xae2eabe2a8;
        }
        if c0 & 0x10 != 0 {
            c = c ^ 0x1e4f43e470;
        }
    }
    c ^ 1
}
// Calculates a 40-bit checksum given a vector of 5-bit values. The checksum is a BCH code
// over GF(32). The Bitcoin ABC implementation describes this function in detail.
Calculates a 40-bit checksum given a vector of 5-bit values. The checksum is a BCH code
over GF(32). The Bitcoin ABC implementation describes this function in detail.
Calculates a 40 - bit checksum given a vector of 5 - bit values . The checksum is a BCH code over GF ( 32 ) . The Bitcoin ABC implementation describes this function in detail .
fn polymod(v: &Vec<u8>) -> u64 {
    let mut c: u64 = 1;
    for d in v.iter() {
        let c0: u8 = (c >> 35) as u8;
        c = ((c & 0x07ffffffff) << 5) ^ (*d as u64);
        if c0 & 0x01 != 0 {
            c = c ^ 0x98f2bc8e61;
        }
        if c0 & 0x02 != 0 {
            c = c ^ 0x79b76d99e2;
        }
        if c0 & 0x04 != 0 {
            c = c ^ 0xf33e5fb3c4;
        }
        if c0 & 0x08 != 0 {
            c = c ^ 0xae2eabe2a8;
        }
        if c0 & 0x10 != 0 {
            c = c ^ 0x1e4f43e470;
        }
    }
    c ^ 1
}
fn polymod ( v : & Vec < u8 > ) -> u64 { let mut c : u64 = 1 ; for d in v . iter ( ) { let c0 : u8 = ( c >> 35 ) as u8 ; c = ( ( c & 0x07ffffffff ) << 5 ) ^ ( * d as u64 ) ; if c0 & 0x01 != 0 { c = c ^ 0x98f2bc8e61 ; } if c0 & 0x02 != 0 { c = c ^ 0x79b76d99e2 ; } if c0 & 0x04 != 0 { c = c ^ 0xf33e5fb3c4 ; } if c0 & 0x08 != 0 { c = c ^ 0xae2eabe2a8 ; } if c0 & 0x10 != 0 { c = c ^ 0x1e4f43e470 ; } } c ^ 1 }
Calculates a 40-bit checksum given a vector of 5-bit values.
Calculates a 40 - bit checksum given a vector of 5 - bit values .
v
&Vec<u8>
v
&Vec<u8>