checksum

Crates.iochecksum
lib.rschecksum
version0.2.1
sourcesrc
created_at2016-02-19 03:34:13.883354
updated_at2016-12-23 18:30:36.133767
descriptionCalculates crc32/crc64 file checksums written in Rust
homepage
repositoryhttps://github.com/BrunoMacias/checksum-rs.git
max_upload_size
id4212
size8,185
(BrunoMacias)

documentation

README

checksum-rs Build Status

Calculates CRC32/CRC64 file checksums written in Rust. CRC32 uses the IEEE polynomial 0xEDB88320 by default and CRC64 uses the ECMA polynomial 0xC96C5795D7870F42

Usage

extern crate checksum;
use checksum::crc::Crc as crc;
use std::env;

pub fn main() {
    let filename: &str = &env::args().nth(2).unwrap()[..];
    let mut crc = crc::new(filename);
    match crc.checksum() {
        Ok(checksum) => {
            println!("CRC32: {:X}", checksum.crc32);
            println!("CRC64: {:X}", checksum.crc64);
        }
        Err(e) => {
            println!("{}", e);
        }
    }
}

License

MIT

Commit count: 17

cargo fmt