Lyricdev
GitHub

interface Hasher

pub interface Hasher

Computes a hash: a value's parts are written in, the hash is read out.

The hashers themselves live in std.hash.

Methods

mut fn writeByte(b: uint8): void

Writes one byte.

mut fn write(bytes: Slice<uint8>): void

Writes the bytes, in order.

mut fn writeUint(v: uint64): void

Writes the eight bytes of v, the lowest first.

mut fn writeInt(v: int): void

Writes the eight bytes of v in two's complement, the lowest first.

fn finish(): uint64

Returns the hash of the bytes written so far; more may be written after.