XXHTemplate

Template API XXHTemplate implementation. Uses parameters to configure for number of bits and XXH variant (classic or XXH3) See std.digest for differences between template and OOP API.

Members

Functions

finish
ubyte[digestSize / 8] finish()

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

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

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

start
void start()

Used to (re)initialize the XXHTemplate digest.

Manifest constants

digestSize
enum digestSize;
Undocumented in source.

Examples

// Simple example using the XXH_64 digest
XXHTemplate!(XXH64_hash_t, XXH64_state_t, false) hash1;
hash1.start();
hash1.put(cast(ubyte) 0);
auto result = hash1.finish();

Meta