KeccakEx (KeccakEx v0.3.0) View Source

Implementation of Keccak in pure Elixir.

From: https://github.com/tronprotocol/java-http-client/blob/master/src/main/java/org/tron/common/crypto/cryptohash/KeccakCore.java

Link to this section Summary

Functions

Returns the keccak hash.

Returns the keccak hash. This is the same function created for this module to be used instead of ExKecak.hash256.

Link to this section Functions

Returns the keccak hash.

Examples

iex> key = "7adf4255f518ca27b9b41ddfd97d4a3799e02347b3b1b7c525b67371b3db350a571b3bddb9732868daeab70f9ac9bd842c8b26e605855899f32f8526c2e6d5ed"
iex> decoded = Base.decode16!(key, case: :mixed)
iex> KeccakEx.hash(decoded)
<<170, 68, 45, 42, 41, 217, 15, 232, 186, 206, 34, 243, 192, 82,
        108, 106, 223, 154, 173, 171, 167, 80, 45, 69, 65, 191, 240, 51,
        185, 140, 72, 181>>

Returns the keccak hash. This is the same function created for this module to be used instead of ExKecak.hash256.