ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
SecureScope Class Reference

RAII scope guard for secure borrows - marks on entry, wipes and reclaims on every exit. More...

#include <secure.h>

Public Member Functions

 SecureScope ()
 
 ~SecureScope ()
 
 SecureScope (const SecureScope &)=delete
 
SecureScopeoperator= (const SecureScope &)=delete
 

Detailed Description

RAII scope guard for secure borrows - marks on entry, wipes and reclaims on every exit.

The reason to prefer this over pc_secure_release(): a secret's wipe must happen on every path, including the early returns taken when a peer sends something malformed, and those are exactly the paths a hand-written wipe gets forgotten on.

Definition at line 178 of file secure.h.

Constructor & Destructor Documentation

◆ SecureScope() [1/2]

SecureScope::SecureScope ( )
inline

Definition at line 181 of file secure.h.

◆ ~SecureScope()

SecureScope::~SecureScope ( )
inline

Definition at line 184 of file secure.h.

References pc_secure_release().

◆ SecureScope() [2/2]

SecureScope::SecureScope ( const SecureScope )
delete

Member Function Documentation

◆ operator=()

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

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