// Read the key file, and derive a 64-bit key by using half of the
// bits from the MD5 digest.
Read the key file, and derive a 64-bit key by using half of the
bits from the MD5 digest.
Read the key file and derive a 64 - bit key by using half of the bits from the MD5 digest .
fn read_key(args: &ArgMatches) -> Result<u64, io::Error> {
    let mut result: u64 = 0;
    let key = fs::read_to_string(args.value_of("key").unwrap())?;
    let digest = md5::compute(key);
    for i in 8..16 {
        result <<= 8;
        result |= digest.0[i] as u64;
    }
    return Ok(result);
}
fn read_key ( args : & ArgMatches ) -> Result < u64 , io :: Error > { let mut result : u64 = 0 ; let key = fs :: read_to_string ( args . value_of ( " " ) . unwrap ( ) ) ? ; let digest = md5 :: compute ( key ) ; for i in 8 .. 16 { result <<= 8 ; result |= digest . 0 [ i ] as u64 ; } return Ok ( result ) ; }
Read the key file, and derive a 64-bit key by using half of the
bits from the MD5 digest.
Read the key file and derive a 64 - bit key by using half of the bits from the MD5 digest .
args
&ArgMatches