#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 16 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 24 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 34 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 38 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 26 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 64 bytes or more.
Definition at line 28 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 15 of file hmac_sha256.cpp.
◆ ctx_
| mbedtls_md_context_t esphome::hmac_sha256::HmacSHA256::ctx_ {} |
|
protected |
◆ digest_
◆ ihash_
◆ ohash_
◆ SHA256_DIGEST_SIZE
| size_t esphome::hmac_sha256::HmacSHA256::SHA256_DIGEST_SIZE = 32 |
|
staticconstexprprotected |
The documentation for this class was generated from the following files: