View source code
Display the source code in std/digest/ripemd.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Alias std.digest.ripemd.RIPEMD160Digest

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

alias RIPEMD160Digest = std.digest.WrapperDigest!(std.digest.ripemd.RIPEMD160);

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

Example

//Simple example, hashing a string using Digest.digest helper function
auto md = new RIPEMD160Digest();
ubyte[] hash = md.digest("abc");
//Let's get a hash string
writeln(toHexString(hash)); // "8EB208F7E05D987A9B044A8E98C6B087F15A0BFC"

Example

//Let's use the OOP features:
void test(Digest dig)
{
  dig.put(cast(ubyte) 0);
}
auto md = new RIPEMD160Digest();
test(md);

//Let's use a custom buffer:
ubyte[20] buf;
ubyte[] result = md.finish(buf[]);
writeln(toHexString(result)); // "C81B94933420221A7AC004A90242D8B1D3E5070D"

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.

License

Boost License 1.0.