20 #ifndef RIPPLE_PROTOCOL_DIGEST_H_INCLUDED
21 #define RIPPLE_PROTOCOL_DIGEST_H_INCLUDED
23 #include <ripple/basics/base_uint.h>
24 #include <ripple/crypto/secure_erase.h>
25 #include <boost/endian/conversion.hpp>
49 static constexpr
auto const endian = boost::endian::order::native;
71 static constexpr
auto const endian = boost::endian::order::native;
93 static constexpr
auto const endian = boost::endian::order::native;
137 static constexpr
auto const endian = boost::endian::order::native;
151 rh(d0.data(), d0.size());
165 template <
bool Secure>
172 static constexpr
auto const endian = boost::endian::order::big;
190 return result_type::fromVoid(
digest.data());
214 template <
class... Args>
230 template <
class... Args>
std::array< std::uint8_t, 20 > result_type
Returns the SHA512-Half digest of a message.
openssl_ripemd160_hasher()
void operator()(void const *data, std::size_t size) noexcept
void operator()(void const *data, std::size_t size) noexcept
sha512_half_hasher_s::result_type sha512Half_s(Args const &... args)
Returns the SHA512-Half of a series of objects.
static Hasher::result_type digest(void const *data, std::size_t size) noexcept
void erase(STObject &st, TypedField< U > const &f)
Remove a field in an STObject.
std::array< std::uint8_t, 64 > result_type
Returns the RIPEMD-160 digest of the SHA256 hash of the message.
void erase(std::true_type)
void operator()(void const *data, std::size_t size) noexcept
~basic_sha512_half_hasher()
void erase(std::false_type)
std::array< std::uint8_t, 32 > result_type
static constexpr const auto endian
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::enable_if_t< is_contiguously_hashable< T, Hasher >::value > hash_append(Hasher &h, T const &t) noexcept
Logically concatenate input data to a Hasher.
sha512_half_hasher::result_type sha512Half(Args const &... args)
Returns the SHA512-Half of a series of objects.
Message digest functions used in the codebase.
void hash_append(Hasher &h, ValidatorBlobInfo const &blobInfo)
void secure_erase(void *dest, std::size_t bytes)
Attempts to clear the given blob of memory.