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);
24openssl_ripemd160_hasher::
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);
49openssl_sha512_hasher::
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);
74openssl_sha256_hasher::
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
openssl_ripemd160_hasher()
void operator()(void const *data, std::size_t size) noexcept
void operator()(void const *data, std::size_t size) noexcept