From fdf662f8f1a1a3b38fe4d251982fffab8e9bf664 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 17 May 2026 05:27:06 +0530 Subject: Phase 7: MCP handler (25 tests), NIP-04 encrypt/decrypt (15 tests), CVM server skeleton - mcp_handler.c/h: 4 tools (get_config, set_config, get_balance, wallet_send) - nip04.c/h: AES-256-CBC + ECDH with 0x02 compressed pubkey prefix - Fixed IV copy bug: mbedTLS AES-CBC modifies IV in-place - Base64 encode/decode for ciphertext transport - PKCS7 padding - cvm_server.c/h: Nostr DM listener with FreeRTOS task - config: cvm_enabled, cvm_relays fields - 156 total tests passing across 10 test binaries --- tests/unit/stubs/esp_system.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/unit/stubs/esp_system.h') diff --git a/tests/unit/stubs/esp_system.h b/tests/unit/stubs/esp_system.h index 8e63c80..cd54743 100644 --- a/tests/unit/stubs/esp_system.h +++ b/tests/unit/stubs/esp_system.h @@ -1,4 +1,14 @@ #ifndef STUBS_ESP_SYSTEM_H #define STUBS_ESP_SYSTEM_H +#include +#include + +static inline void esp_fill_random(uint8_t *buf, size_t len) +{ + for (size_t i = 0; i < len; i++) { + buf[i] = (uint8_t)(rand() & 0xFF); + } +} + #endif -- cgit v1.2.3