This commit is contained in:
Martin Bauer
2024-04-14 18:04:52 +02:00
parent a9ad6e9245
commit 269c6054eb
17 changed files with 763 additions and 15 deletions

View File

@@ -0,0 +1,24 @@
// Copied from https://github.com/ESPresense/ESPresense/blob/master/lib/BleFingerprint/BleFingerprint.cpp
#pragma once
#include "mbedtls/aes.h"
#include "NimBLEDevice.h"
namespace esphome
{
namespace nimble_tracker
{
int bt_encrypt_be(const uint8_t *key, const uint8_t *plaintext, uint8_t *enc_data);
struct encryption_block
{
uint8_t key[16];
uint8_t plain_text[16];
uint8_t cipher_text[16];
};
bool ble_ll_resolv_rpa(const uint8_t *rpa, const uint8_t *irk);
} // namespace nimble_tracker
} // namespace esphome