9#include <aws/cal/hash.h>
32 size_t truncateTo = 0) noexcept;
53 size_t truncateTo = 0) noexcept;
73 size_t truncateTo = 0) noexcept;
100 operator bool() const noexcept;
105 inline
int LastError() const noexcept {
return m_lastError; }
126 bool Update(const
ByteCursor &toHash) noexcept;
135 bool Digest(
ByteBuf &output,
size_t truncateTo = 0) noexcept;
147 bool ComputeOneShot(const
ByteCursor &input,
ByteBuf &output,
size_t truncateTo = 0) noexcept;
153 size_t DigestSize() const noexcept;
156 Hash(aws_hash *hash) noexcept;
178 aws_hash *SeatForCInterop(
const std::shared_ptr<ByoHash> &selfRef);
199 static
void s_Destroy(struct aws_hash *hash);
200 static
int s_Update(struct aws_hash *hash, const struct aws_byte_cursor *buf);
201 static
int s_Finalize(struct aws_hash *hash, struct aws_byte_buf *out);
203 static aws_hash_vtable s_Vtable;
204 aws_hash m_hashValue;
#define AWS_CRT_CPP_API
Definition Exports.h:36
virtual bool DigestInternal(ByteBuf &output, size_t truncateTo=0) noexcept=0
virtual bool UpdateInternal(const ByteCursor &toHash) noexcept=0
Hash & operator=(const Hash &)=delete
Hash(const Hash &)=delete
bool AWS_CRT_CPP_API ComputeMD5(Allocator *allocator, const ByteCursor &input, ByteBuf &output, size_t truncateTo=0) noexcept
Definition Hash.cpp:41
bool AWS_CRT_CPP_API ComputeSHA1(Allocator *allocator, const ByteCursor &input, ByteBuf &output, size_t truncateTo=0) noexcept
Definition Hash.cpp:30
std::function< std::shared_ptr< ByoHash >(size_t digestSize, Allocator *)> CreateHashCallback
Definition Hash.h:208
static const size_t SHA256_DIGEST_SIZE
Definition Hash.h:19
bool AWS_CRT_CPP_API ComputeSHA256(Allocator *allocator, const ByteCursor &input, ByteBuf &output, size_t truncateTo=0) noexcept
Definition Hash.cpp:15
static const size_t MD5_DIGEST_SIZE
Definition Hash.h:20
static const size_t SHA1_DIGEST_SIZE
Definition Hash.h:18
aws_byte_cursor ByteCursor
Definition Types.h:31
aws_allocator Allocator
Definition Allocator.h:14
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition Allocator.cpp:24
aws_byte_buf ByteBuf
Definition Types.h:30
AWS_CRT_CPP_API int LastError() noexcept
Definition Api.cpp:425
Definition Allocator.h:11
Definition StringView.h:862