Adler32

Template API Adler32 implementation.

Members

Functions

finish
ubyte[4] finish()

Returns the finished Adler-32 digest. This also calls start to reset the internal state.

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

Feeds the digest with data.

start
void start()

Initializes the digest calculation.

Examples

Adler32 adler;
adler.start();
adler.put(cast(ubyte[])"abc");
assert(adler.finish() == x"024d0127");
adler.start();
adler.put(cast(ubyte[])"def");
assert(adler.finish() == x"025F0130");

Meta