class RemiLib::Digest::Crc64
- RemiLib::Digest::Crc64
- Reference
- Object
Overview
A 64-bit Cyclic Redundancy Check.
Defined in:
remilib/digest/crc64.crConstant Summary
-
ECMA_POLY =
14514072000185962306_u64
-
The polynomial as defined in ECMA 182.
-
ISO_POLY =
15564440312192434176_u64
-
The polynomial as defined in ISO 3309.
Constructors
-
.new(poly : UInt64 = ECMA_POLY)
Creates a new
Crc64
instance.
Instance Method Summary
-
#crc : UInt64
The current checksum.
-
#polynomial : UInt64
The polynomial that this instance is currently using.
-
#polynomial=(polynomial : UInt64) : Nil
Changes the polynomial that is used.
-
#reset : Nil
Resets this instance to the initial state.
-
#update(value : UInt8) : UInt64
Updates the checksum with value.
-
#update(buf : Bytes | Array(UInt8)) : UInt64
Updates the checksum with the bytes in buf.
Constructor Detail
Instance Method Detail
Changes the polynomial that is used. NOTE: This resets this instance to the initial state as well.
Updates the checksum with value. Returns the new checksum.
Updates the checksum with the bytes in buf. Returns the new checksum.