1#include <xrpl/protocol/digest.h>
3#include <openssl/ripemd.h>
4#include <openssl/sha.h>
14 sizeof(RIPEMD160_CTX),
16 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(
ctx_);
25 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(ctx_);
26 RIPEMD160_Update(ctx, data, size);
31 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(ctx_);
33 RIPEMD160_Final(
digest.data(), ctx);
44 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(
ctx_);
51 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(ctx_);
52 SHA512_Update(ctx, data, size);
57 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(ctx_);
59 SHA512_Final(
digest.data(), ctx);
70 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(
ctx_);
77 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(ctx_);
78 SHA256_Update(ctx, data, size);
83 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(ctx_);
85 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