From f9a605e60d94aba37f602296ff37f4047fc386af Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 16 Jan 2026 12:17:59 -1000 Subject: [PATCH] fix merge --- esphome/components/hmac_sha256/hmac_sha256.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/esphome/components/hmac_sha256/hmac_sha256.cpp b/esphome/components/hmac_sha256/hmac_sha256.cpp index 4969aac261..2146e961bc 100644 --- a/esphome/components/hmac_sha256/hmac_sha256.cpp +++ b/esphome/components/hmac_sha256/hmac_sha256.cpp @@ -24,7 +24,9 @@ void HmacSHA256::calculate() { mbedtls_md_hmac_finish(&this->ctx_, this->digest_ void HmacSHA256::get_bytes(uint8_t *output) { memcpy(output, this->digest_, SHA256_DIGEST_SIZE); } -void HmacSHA256::get_hex(char *output) { format_hex_to(output, this->digest_, SHA256_DIGEST_SIZE); } +void HmacSHA256::get_hex(char *output) { + format_hex_to(output, SHA256_DIGEST_SIZE * 2 + 1, this->digest_, SHA256_DIGEST_SIZE); +} bool HmacSHA256::equals_bytes(const uint8_t *expected) { return memcmp(this->digest_, expected, SHA256_DIGEST_SIZE) == 0;