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(scope const(ubyte)[] data...)

Feeds the digest with data.

start
void start()

Initializes the digest calculation.

Examples

1 Adler32 adler;
2 adler.start();
3 adler.put(cast(ubyte[])"abc");
4 assert(adler.finish() == x"024d0127");
5 adler.start();
6 adler.put(cast(ubyte[])"def");
7 assert(adler.finish() == x"025F0130");

Meta