Mudr-209 <Premium ◆>
/* Compute CRC over header+payload (excluding CRC field) */ hdr->crc32 = crc32_compute(record_buf, sizeof(mudr209_hdr_t) + len);
/* AES‑GCM‑256 encryption + authentication tag */ aes_gcm_encrypt(SE_KEY_LOG, record_buf, sizeof(mudr209_hdr_t)+hdr->payload_sz, record_buf); // in‑place encrypt MUDR-209
/* Public API ---------------------------------------------------------------*/ void mudr209_log(const uint8_t *payload, uint32_t len) /* Compute CRC over header+payload (excluding CRC field)
/* 4. Write to flash (append‑only) ------------------------------------------*/ static void persist_record(void) crc32 = crc32_compute(record_buf
if (len > PAYLOAD_MAX) return; // guard assemble_record(payload, len); protect_record(); persist_record(); update_merkle();