AWS IoT Device SDK C++ v2: Aws::Crt::Crypto::ByoHMAC Class Reference

AWS IoT Device SDK C++ v2 1.14.0 AWS IoT Device SDK C++ v2

Public Member Functions | Protected Member Functions | List of all members
Aws::Crt::Crypto::ByoHMAC Class Referenceabstract

`#include <HMAC.h>`

## Public Member Functions
virtual | ~ByoHMAC ()=default

## Protected Member Functions
| ByoHMAC (size_t digestSize, const ByteCursor &secret, Allocator *allocator=g_allocator)
virtual bool | UpdateInternal (const ByteCursor &toHash) noexcept=0
virtual bool | DigestInternal (ByteBuf &output, size_t truncateTo=0) noexcept=0

## Detailed Description

BYO_CRYPTO: Base class for custom HMAC implementations.

If using BYO_CRYPTO, you must define concrete implementations for the required HMAC algorithms and set their creation callbacks via functions like ApiHandle.SetBYOCryptoNewSHA256HMACCallback().

## Constructor & Destructor Documentation

## ◆ ~ByoHMAC()

virtual Aws::Crt::Crypto::ByoHMAC::~ByoHMAC | ( |  | ) |
| virtualdefault

## ◆ ByoHMAC()

Aws::Crt::Crypto::ByoHMAC::ByoHMAC | ( | size_t | digestSize,
|  | const ByteCursor & | secret,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| protected

## Member Function Documentation

## ◆ DigestInternal()

virtual bool Aws::Crt::Crypto::ByoHMAC::DigestInternal | ( | ByteBuf & | output,
|  | size_t | truncateTo = `0`
| ) |  |
| protectedpure virtualnoexcept

Complete the HMAC computation and write the final digest to output. This cannote be called more than once. If truncate_to is something other than 0, the output must be truncated to that number of bytes. Raise an AWS error and return false to indicate failure.

## ◆ UpdateInternal()

virtual bool Aws::Crt::Crypto::ByoHMAC::UpdateInternal | ( | const ByteCursor & | toHash | ) |
| protectedpure virtualnoexcept

Updates the running HMAC with to_hash. This can be called multiple times. Raise an AWS error and return false to indicate failure.

The documentation for this class was generated from the following files:

- crt/aws-crt-cpp/include/aws/crt/crypto/HMAC.h
- crt/aws-crt-cpp/source/crypto/HMAC.cpp