Struct xxhash2::State64 [] [src]

pub struct State64 { /* fields omitted */ }

Representation of the intermediate state of a 64-bit xxHash instance.

This structure can be used to generate a 64-bit hash of a block of bytes.

Methods

impl State64
[src]

Creates a new blank instance of the 64-bit xxHash state.

This state can then be used to hash a list of bytes and acquire the result via the finish method.

Examples

let state = xxhash2::State64::new();

Input a block of bytes into this hasher.

This function will update the internal state of this hasher with a new list of bytes to feed in. To get the hash value of the block (and all previous bytes), call the finish function.

Examples

let mut state = xxhash2::State64::new();
state.update(&[1, 2, 3, 4]);

Reset the internal state of this hasher with a given seed.

This is useful to reuse a hasher or to persist the state across multiple runs of a hasher.

Examples

let mut state = xxhash2::State64::new();
state.update(&[1, 2, 3, 4]);

Computes the final hash result of all bytes that have been input to this hasher.

Returns the 64-bit checksum of the result.

Examples

let mut state = xxhash2::State64::new();
state.update(&[1, 2, 3, 4]);
assert_eq!(state.finish(), 6063570110359613137);

Trait Implementations

impl Hasher for State64
[src]

Writes some data into this Hasher. Read more

Completes a round of hashing, producing the output hash generated. Read more

Writes a single u8 into this hasher.

Writes a single u16 into this hasher.

Writes a single u32 into this hasher.

Writes a single u64 into this hasher.

🔬 This is a nightly-only experimental API. (i128)

Writes a single u128 into this hasher.

Writes a single usize into this hasher.

Writes a single i8 into this hasher.

Writes a single i16 into this hasher.

Writes a single i32 into this hasher.

Writes a single i64 into this hasher.

🔬 This is a nightly-only experimental API. (i128)

Writes a single i128 into this hasher.

Writes a single isize into this hasher.

impl Clone for State64
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for State64
[src]

Returns the "default value" for a type. Read more