20#include <xrpl/protocol/digest.h>
22#include <openssl/ripemd.h>
23#include <openssl/sha.h>
33 sizeof(RIPEMD160_CTX),
35 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(
ctx_);
44 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(ctx_);
45 RIPEMD160_Update(ctx, data, size);
50 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(ctx_);
52 RIPEMD160_Final(
digest.data(), ctx);
63 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(
ctx_);
70 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(ctx_);
71 SHA512_Update(ctx, data, size);
76 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(ctx_);
78 SHA512_Final(
digest.data(), ctx);
89 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(
ctx_);
96 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(ctx_);
97 SHA256_Update(ctx, data, size);
102 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(ctx_);
104 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
openssl_ripemd160_hasher()
void operator()(void const *data, std::size_t size) noexcept
void operator()(void const *data, std::size_t size) noexcept