XXHash

xxhash object implements std.digest like API for supporting streaming update.

Constructors

this
this(uint seed)

Constructs XXHash with seed.

Members

Functions

finish
uint finish()

Returns the finished XXHash hash. This also calls start to reset the internal state.

put
void put(const(ubyte)[] data)

Use this to feed the hash with data. Also implements the std.range.OutputRange interface for ubyte and const(ubyte)[].

start
void start()

Used to (re)initialize the XXHash.

Examples

XXHash xh;

xh.start();
foreach (chunk; chunks(cast(ubyte[])"D-man is so cute!", 2))
    xh.put(chunk);
auto hashed = xh.finish();

Meta