xrpld
Loading...
Searching...
No Matches
xrpl::RipeshaHasher Struct Reference

Returns the RIPEMD-160 digest of the SHA256 hash of the message. More...

#include <digest.h>

Collaboration diagram for xrpl::RipeshaHasher:

Public Types

using result_type = std::array<std::uint8_t, 20>

Public Member Functions

void operator() (void const *data, std::size_t size) noexcept
 operator result_type () noexcept

Static Public Attributes

static constexpr auto kEndian = boost::endian::order::native

Private Attributes

sha256_hasher h_

Detailed Description

Returns the RIPEMD-160 digest of the SHA256 hash of the message.

This operation is used to compute the 160-bit identifier representing an XRPL account, from a message. Typically the message is the public key of the account - which is not stored in the account root.

The same computation is used regardless of the cryptographic scheme implied by the public key. For example, the public key may be an ed25519 public key or a secp256k1 public key. Support for new cryptographic systems may be added, using the same formula for calculating the account identifier.

Meets the requirements of Hasher (in hash_append)

Definition at line 115 of file digest.h.

Member Typedef Documentation

◆ result_type

Definition at line 123 of file digest.h.

Member Function Documentation

◆ operator()()

void xrpl::RipeshaHasher::operator() ( void const * data,
std::size_t size )
noexcept

Definition at line 126 of file digest.h.

◆ operator result_type()

xrpl::RipeshaHasher::operator result_type ( )
explicitnoexcept

Definition at line 132 of file digest.h.

Member Data Documentation

◆ h_

sha256_hasher xrpl::RipeshaHasher::h_
private

Definition at line 118 of file digest.h.

◆ kEndian

auto xrpl::RipeshaHasher::kEndian = boost::endian::order::native
staticconstexpr

Definition at line 121 of file digest.h.