cryptnox-pos 1.0.0
Standalone USDC payment terminal firmware (ESP32 + Cryptnox smart card)
Loading...
Searching...
No Matches
WipeGuard Struct Reference

Scrubs a buffer with CW_Utils::secure_wipe when it leaves scope. More...

#include <pos_app.h>

Public Member Functions

 WipeGuard (uint8_t *b, size_t n)
 ~WipeGuard ()
 WipeGuard (const WipeGuard &)=delete
WipeGuard & operator= (const WipeGuard &)=delete

Public Attributes

uint8_t * buf
size_t len

Detailed Description

Scrubs a buffer with CW_Utils::secure_wipe when it leaves scope.

The payment paths have many early returns; a guard declared next to each sensitive artifact scrubs it on every exit.

Definition at line 215 of file pos_app.h.

Constructor & Destructor Documentation

◆ WipeGuard() [1/2]

WipeGuard::WipeGuard ( uint8_t * b,
size_t n )
inlineexplicit

Definition at line 218 of file pos_app.h.

References buf, and len.

Referenced by operator=(), and WipeGuard().

◆ ~WipeGuard()

WipeGuard::~WipeGuard ( )
inline

Definition at line 219 of file pos_app.h.

References buf, and len.

◆ WipeGuard() [2/2]

WipeGuard::WipeGuard ( const WipeGuard & )
delete

References WipeGuard().

Member Function Documentation

◆ operator=()

WipeGuard & WipeGuard::operator= ( const WipeGuard & )
delete

References WipeGuard().

Member Data Documentation

◆ buf

uint8_t* WipeGuard::buf

Definition at line 216 of file pos_app.h.

Referenced by WipeGuard(), and ~WipeGuard().

◆ len

size_t WipeGuard::len

Definition at line 217 of file pos_app.h.

Referenced by WipeGuard(), and ~WipeGuard().


The documentation for this struct was generated from the following file: