fnv32
pub fn fnv32(s &string) intPurpose
Execute fnv32.
Parameters
s&string- source string (read-only borrow; caller keeps the original; type &string)
Returns
int — a value of this type
#hash/fnvFNV-1 / FNV-1a 32/64.
fnv32pub fn fnv32(s &string) intExecute fnv32.
s &stringint — a value of this type
fnv32apub fn fnv32a(s &string) intExecute fnv32a.
s &stringint — a value of this type
fnv64pub fn fnv64(s &string) intExecute fnv64.
s &stringint — a value of this type
fnv64apub fn fnv64a(s &string) intExecute fnv64a.
s &stringint — a value of this type
struct Digestpub struct Digest {
pub h int
}Fnv Cryptographic hash digest state context.
h intnew32pub fn new32() DigestExecute new32.
No arguments are required.
Digest — a value of this type
new32apub fn new32a() DigestExecute new32a.
No arguments are required.
Digest — a value of this type
new64pub fn new64() DigestExecute new64.
No arguments are required.
Digest — a value of this type
new64apub fn new64a() DigestExecute new64a.
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.