CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
BackupManager.cpp File Reference

Encrypted, versioned, semantic backup loader. More...

#include "cdc_os_ui/BackupManager.h"
#include "cdc_os_ui/SystemSettingsBackup.h"
#include "cdc_core/ModuleRegistry.h"
#include "cdc_core/IModule.h"
#include "cdc_core/Raii.h"
#include "cdc_core/Crypto.h"
#include "cdc_ui/PsramCjson.h"
#include "cdc_log.h"
#include "plugin_manager/PluginStorage.h"
#include "plugin_manager/host_api.h"
#include "cJSON.h"
#include <mbedtls/pkcs5.h>
#include <mbedtls/md.h>
#include <mbedtls/platform_util.h>
#include <mbedtls/base64.h>
#include <esp_random.h>
#include <cstdio>
#include <cstring>
#include <sys/stat.h>

Go to the source code of this file.

Namespaces

namespace  cdc
namespace  cdc::os_ui

Detailed Description

Encrypted, versioned, semantic backup loader.

Owns the single on-device backup container: it collects each module's JSON section via IModule::exportBackup, serializes one document, encrypts it with AES-256-GCM under a PBKDF2-HMAC-SHA256 key derived from the export passphrase, and writes only the ciphertext to the vFAT (plugins) partition. Restore reverses this and routes each section back to its module best-effort.

Definition in file BackupManager.cpp.