20 #include <ripple/protocol/digest.h>
21 #include <openssl/ripemd.h>
22 #include <openssl/sha.h>
31 sizeof(RIPEMD160_CTX),
33 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(
ctx_);
42 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(ctx_);
43 RIPEMD160_Update(ctx, data, size);
48 auto const ctx =
reinterpret_cast<RIPEMD160_CTX*
>(ctx_);
50 RIPEMD160_Final(
digest.data(), ctx);
61 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(
ctx_);
68 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(ctx_);
69 SHA512_Update(ctx, data, size);
74 auto const ctx =
reinterpret_cast<SHA512_CTX*
>(ctx_);
76 SHA512_Final(
digest.data(), ctx);
87 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(
ctx_);
94 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(ctx_);
95 SHA256_Update(ctx, data, size);
100 auto const ctx =
reinterpret_cast<SHA256_CTX*
>(ctx_);
102 SHA256_Final(
digest.data(), ctx);