bytes
XuAPI
pub fn bytes(seed int, data &string) intPurpose
Return the buffered bytes.
Parameters
seedint- random seed (int)
data&string- data (read-only borrow; caller keeps the original; type &string)
Returns
int — a value of this type
#hash/maphashPortable byte hash with explicit seed (not hardware AES bits).
bytespub fn bytes(seed int, data &string) intReturn the buffered bytes.
seed intdata &stringint — a value of this type
of_stringpub fn of_string(seed int, s &string) intOf string.
seed ints &stringint — a value of this type
struct Hashpub struct Hash {
pub seed int
pub state int
pub n int
}Structure encapsulating seed, state, n.
seed intstate intn intnewpub fn new(seed int) HashConstruct a new value of this type.
seed intHash — a value of this type
($&Hash) set_seedpub fn (h $&Hash) set_seed(seed int)Operation on $&Hash: set seed.
h $&HashHash instance used by this call (exclusive borrow).seed intThis call does not return a value.
($&Hash) resetpub fn (h $&Hash) reset()Operation on $&Hash: clear internal state so the value can be reused.
h $&HashHash instance used by this call (exclusive borrow).This call does not return a value.
($&Hash) writepub fn (h $&Hash) write(p &string) intOperation on $&Hash: write data and return the byte count.
h $&HashHash instance used by this call (exclusive borrow).p &stringint — bytes written
(Hash) sum64pub fn (h Hash) sum64() intOperation on Hash: compute a digest (often lowercase hex).
h HashHash instance used by this call (value receiver).int — a value of this type
(Hash) seedpub fn (h Hash) seed() intExecute seed on Hash.
h HashHash instance used by this call (value receiver).int — a value of this type