DJB2

Implementation of DJB2 digester.

DJB2 is a widely used non-cryptographic hash function created by Daniel J. Bernstein. It is simple, fast, and produces well-distributed hash values for various inputs.

static
@digester
class DJB2 {}

Members

Static functions

hash
ubyte[] hash(ubyte[] data)

Computes the DJB2 hash digest of the given data.

Examples

import tern.digest.djb2;

ubyte[] data = [1, 2, 3, 4, 5];
auto hashValue = DJB2.hash(data);

Meta