EEVM.Crypto.RIPEMD160 (eevm v0.1.0)

Copy Markdown View Source

RIPEMD-160 in pure Elixir, as specified by Dobbertin, Bosselaers and Preneel, "RIPEMD-160: A Strengthened Version of RIPEMD" (1996). Used by the 0x03 precompile.

Each 64-byte block runs through two parallel lines of five 16-step rounds, which are then combined into the 160-bit state. Words are little-endian, like MD4's.

Example

iex> EEVM.Crypto.RIPEMD160.hash("abc") |> Base.encode16(case: :lower)
"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc"

Summary

Functions

Returns the 20-byte RIPEMD-160 digest of message.

Functions

hash(message)

@spec hash(binary()) :: <<_::160>>

Returns the 20-byte RIPEMD-160 digest of message.

Example

iex> EEVM.Crypto.RIPEMD160.hash("") |> Base.encode16(case: :lower)
"9c1185a5c5e9fc54612808977ee8f548b2258d31"