#include <hmac_sha256.h>
|
| | HmacSHA256 ()=default |
| |
| | ~HmacSHA256 () |
| |
| void | init (const uint8_t *key, size_t len) |
| | Initialize a new HMAC-SHA256 digest computation.
|
| |
| void | init (const char *key, size_t len) |
| |
| void | init (const std::string &key) |
| |
| void | add (const uint8_t *data, size_t len) |
| | Add bytes of data for the digest.
|
| |
| void | add (const char *data, size_t len) |
| |
| void | calculate () |
| | Compute the digest, based on the provided data.
|
| |
| void | get_bytes (uint8_t *output) |
| | Retrieve the HMAC-SHA256 digest as bytes.
|
| |
| void | get_hex (char *output) |
| | Retrieve the HMAC-SHA256 digest as hex characters.
|
| |
| bool | equals_bytes (const uint8_t *expected) |
| | Compare the digest against a provided byte-encoded digest (32 bytes).
|
| |
| bool | equals_hex (const char *expected) |
| | Compare the digest against a provided hex-encoded digest (64 bytes).
|
| |
Definition at line 28 of file hmac_sha256.h.
◆ HmacSHA256()
| esphome::hmac_sha256::HmacSHA256::HmacSHA256 |
( |
| ) |
|
|
default |
◆ ~HmacSHA256()
| esphome::hmac_sha256::HmacSHA256::~HmacSHA256 |
( |
| ) |
|
|
default |
◆ add() [1/2]
| void esphome::hmac_sha256::HmacSHA256::add |
( |
const char * | data, |
|
|
size_t | len ) |
|
inline |
◆ add() [2/2]
| void esphome::hmac_sha256::HmacSHA256::add |
( |
const uint8_t * | data, |
|
|
size_t | len ) |
◆ calculate()
| void esphome::hmac_sha256::HmacSHA256::calculate |
( |
| ) |
|
Compute the digest, based on the provided data.
Definition at line 36 of file hmac_sha256.cpp.
◆ equals_bytes()
| bool esphome::hmac_sha256::HmacSHA256::equals_bytes |
( |
const uint8_t * | expected | ) |
|
Compare the digest against a provided byte-encoded digest (32 bytes).
Definition at line 47 of file hmac_sha256.cpp.
◆ equals_hex()
| bool esphome::hmac_sha256::HmacSHA256::equals_hex |
( |
const char * | expected | ) |
|
Compare the digest against a provided hex-encoded digest (64 bytes).
Definition at line 51 of file hmac_sha256.cpp.
◆ get_bytes()
| void esphome::hmac_sha256::HmacSHA256::get_bytes |
( |
uint8_t * | output | ) |
|
Retrieve the HMAC-SHA256 digest as bytes.
The output must be able to hold 32 bytes or more.
Definition at line 41 of file hmac_sha256.cpp.
◆ get_hex()
| void esphome::hmac_sha256::HmacSHA256::get_hex |
( |
char * | output | ) |
|
Retrieve the HMAC-SHA256 digest as hex characters.
The output must be able to hold 65 bytes or more (64 hex chars + null terminator).
Definition at line 43 of file hmac_sha256.cpp.
◆ init() [1/3]
| void esphome::hmac_sha256::HmacSHA256::init |
( |
const char * | key, |
|
|
size_t | len ) |
|
inline |
◆ init() [2/3]
| void esphome::hmac_sha256::HmacSHA256::init |
( |
const std::string & | key | ) |
|
|
inline |
◆ init() [3/3]
| void esphome::hmac_sha256::HmacSHA256::init |
( |
const uint8_t * | key, |
|
|
size_t | len ) |
Initialize a new HMAC-SHA256 digest computation.
Definition at line 20 of file hmac_sha256.cpp.
◆ ctx_
| mbedtls_md_context_t esphome::hmac_sha256::HmacSHA256::ctx_ {} |
|
protected |
◆ digest_
| uint8_t esphome::hmac_sha256::HmacSHA256::digest_ {} |
|
protected |
◆ ihash_
◆ key_id_
| mbedtls_svc_key_id_t esphome::hmac_sha256::HmacSHA256::key_id_ = MBEDTLS_SVC_KEY_ID_INIT |
|
protected |
◆ ohash_
◆ op_
| psa_mac_operation_t esphome::hmac_sha256::HmacSHA256::op_ = PSA_MAC_OPERATION_INIT |
|
protected |
◆ SHA256_DIGEST_SIZE
| static constexpr size_t esphome::hmac_sha256::HmacSHA256::SHA256_DIGEST_SIZE = 32 |
|
staticconstexprprotected |
The documentation for this class was generated from the following files: