CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
FactoryReset.cpp File Reference
#include "cdc_core/FactoryReset.h"
#include "cdc_log.h"
#include "nvs.h"
#include "nvs_flash.h"
#include "esp_system.h"

Go to the source code of this file.

Namespaces

namespace  cdc
namespace  cdc::core

Functions

TropicWipeResult cdc::core::wipeTropic (hal::ISecureElement *se, uint16_t progressEvery=0, void(*onRmemProgress)(uint16_t current, uint16_t total)=nullptr)
 Iterates every TROPIC01 ECC slot (0..ECC_SLOT_COUNT-1) and R-Memory slot (0..RMEM_SLOT_COUNT-1), deleting whatever is currently populated. Sets sessionReady=false and returns immediately if no active SE session is available.
esp_err_t cdc::core::wipeNvs ()
 Erases the NVS partition and re-initializes it blank.
void cdc::core::selfDestruct ()
 Triggers a full factory wipe on the next boot and restarts.

Variables

static const char * TAG = "FactoryReset"

Variable Documentation

◆ TAG

const char* TAG = "FactoryReset"
static

Definition at line 7 of file FactoryReset.cpp.