mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 01:58:39 +00:00
fixes
This commit is contained in:
@@ -30,7 +30,7 @@ class HmacMD5 {
|
||||
void get_bytes(uint8_t *output);
|
||||
|
||||
/// Retrieve the HMAC-MD5 digest as hex characters.
|
||||
/// The output must be able to hold 32 bytes or more.
|
||||
/// The output must be able to hold 33 bytes or more (32 hex chars + null terminator).
|
||||
void get_hex(char *output);
|
||||
|
||||
/// Compare the digest against a provided byte-encoded digest (16 bytes).
|
||||
|
||||
@@ -35,7 +35,7 @@ class HmacSHA256 {
|
||||
void get_bytes(uint8_t *output);
|
||||
|
||||
/// Retrieve the HMAC-SHA256 digest as hex characters.
|
||||
/// The output must be able to hold 64 bytes or more.
|
||||
/// The output must be able to hold 65 bytes or more (64 hex chars + null terminator).
|
||||
void get_hex(char *output);
|
||||
|
||||
/// Compare the digest against a provided byte-encoded digest (32 bytes).
|
||||
|
||||
@@ -25,7 +25,7 @@ class HashBase {
|
||||
/// Retrieve the hash as bytes
|
||||
void get_bytes(uint8_t *output) { memcpy(output, this->digest_, this->get_size()); }
|
||||
|
||||
/// Retrieve the hash as hex characters
|
||||
/// Retrieve the hash as hex characters. Output buffer must hold get_size() * 2 + 1 bytes.
|
||||
void get_hex(char *output) { format_hex_to(output, this->get_size() * 2 + 1, this->digest_, this->get_size()); }
|
||||
|
||||
/// Compare the hash against a provided byte-encoded hash
|
||||
|
||||
Reference in New Issue
Block a user