AWS IoT Device SDK C++ v2
1.38.0
AWS IoT Device SDK C++ v2
|
#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 |
size_t | DigestSize () const noexcept |
bool | ComputeOneShot (const ByteCursor &input, 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 | ) |
|
noexcept |
Computes the running HMAC and 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 HMAC digest. Returns true on success. Call LastError() for the reason this call failed.
This is an API a user would use for smaller size inputs. For larger, streaming inputs, use multiple calls to Update() for each buffer, followed by a single call to Digest().
|
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.
|
noexcept |
Returns the size of the digest for this hmac algorithm. If this object is not valid, it will return 0 instead.
|
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.