pub struct CRCu64 { /* private fields */ }
Expand description
This struct can help you compute a CRC-64 (or CRC-x where x is equal or less than 64
) value.
Implementations§
source§impl CRCu64
impl CRCu64
source§impl CRCu64
impl CRCu64
sourcepub fn get_crc_vec_le(&mut self) -> Vec<u8>
pub fn get_crc_vec_le(&mut self) -> Vec<u8>
Get the current CRC value (it always returns a vec instance with a length corresponding to the CRC bits). You can continue calling digest
method even after getting a CRC value.
sourcepub fn get_crc_vec_be(&mut self) -> Vec<u8>
pub fn get_crc_vec_be(&mut self) -> Vec<u8>
Get the current CRC value (it always returns a vec instance with a length corresponding to the CRC bits). You can continue calling digest
method even after getting a CRC value.
source§impl CRCu64
impl CRCu64
sourcepub fn crc40gsm() -> CRCu64
pub fn crc40gsm() -> CRCu64
Check | Poly | Init | Ref | XorOut |
---|---|---|---|---|
0xD4164FC646 | 0x0004820009 | 0x0000000000 | false | 0xFFFFFFFFFF |
let mut crc = CRCu64::crc40gsm();
crc.digest(b"123456789");
assert_eq!("0xD4164FC646", &crc.to_string());
sourcepub fn crc64() -> CRCu64
pub fn crc64() -> CRCu64
Check | Poly | Init | Ref | XorOut |
---|---|---|---|---|
0x6C40DF5F0B497347 | 0x42F0E1EBA9EA3693 | 0x0000000000000000 | false | 0x0000000000000000 |
let mut crc = CRCu64::crc64();
crc.digest(b"123456789");
assert_eq!("0x6C40DF5F0B497347", &crc.to_string());
sourcepub fn crc64iso() -> CRCu64
pub fn crc64iso() -> CRCu64
Check | Poly | Init | Ref | XorOut |
---|---|---|---|---|
0xB90956C775A41001 | 0x000000000000001B (rev: 0xD800000000000000) | 0xFFFFFFFFFFFFFFFF | true | 0xFFFFFFFFFFFFFFFF |
let mut crc = CRCu64::crc64iso();
crc.digest(b"123456789");
assert_eq!("0xB90956C775A41001", &crc.to_string());
sourcepub fn crc64we() -> CRCu64
pub fn crc64we() -> CRCu64
Check | Poly | Init | Ref | XorOut |
---|---|---|---|---|
0x62EC59E3F1A4F00A | 0x42F0E1EBA9EA3693 | 0xFFFFFFFFFFFFFFFF | false | 0xFFFFFFFFFFFFFFFF |
let mut crc = CRCu64::crc64we();
crc.digest(b"123456789");
assert_eq!("0x62EC59E3F1A4F00A", &crc.to_string());
sourcepub fn crc64jones() -> CRCu64
pub fn crc64jones() -> CRCu64
Check | Poly | Init | Ref | XorOut |
---|---|---|---|---|
0xE9C6D914C4B8D9CA | 0xAD93D23594C935A9 (rev: 0x95AC9329AC4BC9B5) | 0x0000000000000000 | true | 0x0000000000000000 |
let mut crc = CRCu64::crc64jones();
crc.digest(b"123456789");
assert_eq!("0xE9C6D914C4B8D9CA", &crc.to_string());
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CRCu64
impl RefUnwindSafe for CRCu64
impl Send for CRCu64
impl Sync for CRCu64
impl Unpin for CRCu64
impl UnwindSafe for CRCu64
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more