std.digest.ripemd

Computes RIPEMD-160 hashes of arbitrary data. RIPEMD-160 hashes are 20 byte quantities that are like a checksum or CRC, but are more robust.

This module conforms to the APIs defined in std.digest. To understand the differences between the template and the OOP API, see std.digest.

This module publicly imports std.digest and can be used as a stand-alone module.

License

Boost License 1.0.

CTFE: Digests do not work in CTFE

Authors

Kai Nacke

The algorithm was designed by Hans Dobbertin, Antoon Bosselaers, and Bart Preneel.
The D implementation is a direct translation of the ANSI C implementation by Antoon Bosselaers.

References:

Source: std/digest/ripemd.d

Types 2

structRIPEMD160

Template API RIPEMD160 implementation. See std.digest for differences between template and OOP API.

Fields
uint[5] _state
ulong _count
ubyte[64] _buffer
ubyte[64] _padding
512 blockSize
Methods
uint F(uint x, uint y, uint z)
uint G(uint x, uint y, uint z)
uint H(uint x, uint y, uint z)
uint I(uint x, uint y, uint z)
uint J(uint x, uint y, uint z)
void FF(ref uint a, uint b, ref uint c, uint d, uint e, uint x, uint s) @safe pure nothrow @nogc
void GG(ref uint a, uint b, ref uint c, uint d, uint e, uint x, uint s) @safe pure nothrow @nogc
void HH(ref uint a, uint b, ref uint c, uint d, uint e, uint x, uint s) @safe pure nothrow @nogc
void II(ref uint a, uint b, ref uint c, uint d, uint e, uint x, uint s) @safe pure nothrow @nogc
void JJ(ref uint a, uint b, ref uint c, uint d, uint e, uint x, uint s) @safe pure nothrow @nogc
void FFF(ref uint a, uint b, ref uint c, uint d, uint e, uint x, uint s) @safe pure nothrow @nogc
void GGG(ref uint a, uint b, ref uint c, uint d, uint e, uint x, uint s) @safe pure nothrow @nogc
void HHH(ref uint a, uint b, ref uint c, uint d, uint e, uint x, uint s) @safe pure nothrow @nogc
void III(ref uint a, uint b, ref uint c, uint d, uint e, uint x, uint s) @safe pure nothrow @nogc
void JJJ(ref uint a, uint b, ref uint c, uint d, uint e, uint x, uint s) @safe pure nothrow @nogc
void transform(const(ubyte[64]) * block) pure nothrow @nogc
void put(scope const(ubyte)[] data...) @trusted pure nothrow @nogcUse this to feed the digest with data. Also implements the isOutputRange interface for `ubyte` and `const(ubyte)[]`.
void start() @safe pure nothrow @nogcUsed to (re)initialize the RIPEMD160 digest.
ubyte[20] finish() @trusted pure nothrow @nogcReturns the finished RIPEMD160 hash. This also calls start to reset the internal state.

OOP API RIPEMD160 implementation. See std.digest for differences between template and OOP API.

This is an alias for WrapperDigest!RIPEMD160, see there for more information.

Functions 1

fnauto ripemd160Of(T...)(T data)This is a convenience alias for digest using the RIPEMD160 implementation.