[code-quality] fix clang-tidy md5 and hmac_md5 (#7325)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
tomaszduda23 2024-10-07 00:53:49 +02:00 committed by GitHub
parent fc7628cdea
commit 390299894e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 15 additions and 1 deletions

View file

@ -1,6 +1,7 @@
#include <cstdio>
#include <cstring>
#include "hmac_md5.h"
#ifdef USE_MD5
#include "esphome/core/helpers.h"
namespace esphome {
@ -54,3 +55,4 @@ bool HmacMD5::equals_hex(const char *expected) { return this->ohash_.equals_hex(
} // namespace hmac_md5
} // namespace esphome
#endif

View file

@ -1,8 +1,8 @@
#pragma once
#include "esphome/core/defines.h"
#ifdef USE_MD5
#include "esphome/components/md5/md5.h"
#include <string>
namespace esphome {
@ -46,3 +46,4 @@ class HmacMD5 {
} // namespace hmac_md5
} // namespace esphome
#endif

View file

@ -1 +1,7 @@
import esphome.codegen as cg
CODEOWNERS = ["@esphome/core"]
async def to_code(config):
cg.add_define("USE_MD5")

View file

@ -1,6 +1,7 @@
#include <cstdio>
#include <cstring>
#include "md5.h"
#ifdef USE_MD5
#include "esphome/core/helpers.h"
namespace esphome {
@ -65,3 +66,4 @@ bool MD5Digest::equals_hex(const char *expected) {
} // namespace md5
} // namespace esphome
#endif

View file

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/defines.h"
#ifdef USE_MD5
#ifdef USE_ESP_IDF
#include "esp_rom_md5.h"
@ -66,3 +67,4 @@ class MD5Digest {
} // namespace md5
} // namespace esphome
#endif

View file

@ -50,6 +50,7 @@
#define USE_LVGL_KEYBOARD
#define USE_LVGL_ROTARY_ENCODER
#define USE_LVGL_TOUCHSCREEN
#define USE_MD5
#define USE_MDNS
#define USE_MEDIA_PLAYER
#define USE_MQTT