1#include <xrpl/protocol/digest.h>
3#include <openssl/ripemd.h>
4#include <openssl/sha.h>
13 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(
ctx_);
20 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(
ctx_);
21 RIPEMD160_Update(ctx, data, size);
24OpensslRipemd160Hasher::
27 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(
ctx_);
29 RIPEMD160_Final(
digest.data(), ctx);
38 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(
ctx_);
45 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(
ctx_);
46 SHA512_Update(ctx, data, size);
52 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(
ctx_);
54 SHA512_Final(
digest.data(), ctx);
63 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(
ctx_);
70 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(
ctx_);
71 SHA256_Update(ctx, data, size);
77 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(
ctx_);
79 SHA256_Final(
digest.data(), ctx);
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
static Hasher::result_type digest(void const *data, std::size_t size) noexcept
void operator()(void const *data, std::size_t size) noexcept
std::array< std::uint8_t, 20 > result_type
void operator()(void const *data, std::size_t size) noexcept
std::array< std::uint8_t, 32 > result_type
std::array< std::uint8_t, 64 > result_type
void operator()(void const *data, std::size_t size) noexcept