const ISO
pub const ISO = -2882303761517117440Purpose
Constant ISO, defining protocol or algorithm parameters.
#hash/crc64ISO/ECMA CRC-64.
const ISOpub const ISO = -2882303761517117440Constant ISO, defining protocol or algorithm parameters.
const ECMApub const ECMA = -3932672073523589310Constant ECMA, defining protocol or algorithm parameters.
struct Tablepub struct Table {
pub entries [256]int
}Structure encapsulating entries.
entries [256]intmake_tablepub fn make_table(poly int) TableBuild 256-entry CRC lookup table from polynomial.
poly intTable — a value of this type
updatepub fn update(crc int, tab &Table, data &string) intExecute update.
crc inttab &Tabledata &stringint — a value of this type
checksumpub fn checksum(data &string, tab &Table) intCompute the 32-bit checksum of the data.
data &stringtab &Tableint — a value of this type
struct Digestpub struct Digest {
pub tab Table
pub crc int
}Crc64 Cryptographic hash digest state context.
tab Tablecrc intnew_isopub fn new_iso() DigestConstruct iso.
No arguments are required.
Digest — a value of this type
new_ecmapub fn new_ecma() DigestConstruct ecma.
No arguments are required.
Digest — a value of this type
($&Digest) writepub fn (d $&Digest) write(p &string) intOperation on $&Digest: write data and return the byte count.
d $&DigestDigest instance used by this call (exclusive borrow).p &stringint — bytes written
(&Digest) sumpub fn (d &Digest) sum() intOperation on &Digest: compute a digest (often lowercase hex).
d &DigestDigest instance used by this call (borrow).int — a value of this type
(&Digest) sizepub fn (d &Digest) size() intOperation on &Digest: return the size.
d &DigestDigest instance used by this call (borrow).int — a value of this type
($&Digest) resetpub fn (d $&Digest) reset()Operation on $&Digest: clear internal state so the value can be reused.
d $&DigestDigest instance used by this call (exclusive borrow).This call does not return a value.
checksum_isopub fn checksum_iso(data &string) intCompute CRC-64 checksum using ISO polynomial.
data &stringint — a value of this type
checksum_ecmapub fn checksum_ecma(data &string) intCompute CRC-64 checksum using ECMA polynomial.
data &stringint — a value of this type