This commit is contained in:
J. Nick Koston
2025-12-27 15:40:32 -10:00
parent 89f326be30
commit 53ad49086d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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).
+1 -1
View File
@@ -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).
+1 -1
View File
@@ -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