aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
|
#include <HMAC.h>
Public Member Functions | |
~HMAC () | |
HMAC (const HMAC &)=delete | |
HMAC & | operator= (const HMAC &)=delete |
HMAC (HMAC &&toMove) | |
HMAC & | operator= (HMAC &&toMove) |
operator bool () const noexcept | |
int | LastError () const noexcept |
bool | Update (const ByteCursor &toHMAC) noexcept |
bool | Digest (ByteBuf &output, size_t truncateTo=0) noexcept |
Static Public Member Functions | |
static HMAC | CreateSHA256HMAC (Allocator *allocator, const ByteCursor &secret) noexcept |
static HMAC | CreateSHA256HMAC (const ByteCursor &secret) noexcept |
Streaming HMAC object. The typical use case is for computing the HMAC of an object that is too large to load into memory. You can call Update() multiple times as you load chunks of data into memory. When you're finished simply call Digest(). After Digest() is called, this object is no longer usable.
Aws::Crt::Crypto::HMAC::~HMAC | ( | ) |
|
delete |
Aws::Crt::Crypto::HMAC::HMAC | ( | HMAC && | toMove | ) |
|
staticnoexcept |
Creates an instance of a Streaming SHA256 HMAC.
|
staticnoexcept |
Creates an instance of a Streaming SHA256 HMAC using the Default Allocator.
|
noexcept |
Finishes the running HMAC operation and writes the digest into output. The available capacity of output must be large enough for the digest. See: SHA256_DIGEST_SIZE and MD5_DIGEST_SIZE for size hints. 'truncateTo' is for if you want truncated output (e.g. you only want the first 16 bytes of a SHA256 digest. Returns true on success. Call LastError() for the reason this call failed.
|
inlinenoexcept |
Returns the value of the last aws error encountered by operations on this instance.
|
inlinenoexcept |
Returns true if the instance is in a valid state, false otherwise.
|
noexcept |
Updates the running HMAC object with data in toHMAC. Returns true on success. Call LastError() for the reason this call failed.