Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
signet::forge::crypto::SecureKeyBuffer Class Reference

RAII container for sensitive key material with mlock and secure zeroization. More...

#include <cipher_interface.hpp>

Public Member Functions

 SecureKeyBuffer (const std::vector< uint8_t > &key)
 Construct from existing key bytes (copies and locks).
 
 SecureKeyBuffer (const uint8_t *ptr, size_t size)
 Construct from raw bytes (copies and locks).
 
 SecureKeyBuffer (size_t size)
 Construct with a specified size of random key material.
 
 ~SecureKeyBuffer ()
 
 SecureKeyBuffer (SecureKeyBuffer &&other) noexcept
 
SecureKeyBufferoperator= (SecureKeyBuffer &&other) noexcept
 
 SecureKeyBuffer (const SecureKeyBuffer &)=delete
 
SecureKeyBufferoperator= (const SecureKeyBuffer &)=delete
 
const uint8_t * data () const
 
uint8_t * data ()
 
size_t size () const
 
bool empty () const
 

Detailed Description

RAII container for sensitive key material with mlock and secure zeroization.

  • Locks memory on construction (prevents swap-out)
  • Securely zeros and unlocks on destruction
  • Move-only (no copy to prevent key duplication)

Definition at line 320 of file cipher_interface.hpp.

Constructor & Destructor Documentation

◆ SecureKeyBuffer() [1/5]

signet::forge::crypto::SecureKeyBuffer::SecureKeyBuffer ( const std::vector< uint8_t > &  key)
inlineexplicit

Construct from existing key bytes (copies and locks).

Definition at line 323 of file cipher_interface.hpp.

◆ SecureKeyBuffer() [2/5]

signet::forge::crypto::SecureKeyBuffer::SecureKeyBuffer ( const uint8_t *  ptr,
size_t  size 
)
inline

Construct from raw bytes (copies and locks).

Definition at line 329 of file cipher_interface.hpp.

◆ SecureKeyBuffer() [3/5]

signet::forge::crypto::SecureKeyBuffer::SecureKeyBuffer ( size_t  size)
inlineexplicit

Construct with a specified size of random key material.

Definition at line 335 of file cipher_interface.hpp.

◆ ~SecureKeyBuffer()

signet::forge::crypto::SecureKeyBuffer::~SecureKeyBuffer ( )
inline

Definition at line 340 of file cipher_interface.hpp.

◆ SecureKeyBuffer() [4/5]

signet::forge::crypto::SecureKeyBuffer::SecureKeyBuffer ( SecureKeyBuffer &&  other)
inlinenoexcept

Definition at line 346 of file cipher_interface.hpp.

◆ SecureKeyBuffer() [5/5]

signet::forge::crypto::SecureKeyBuffer::SecureKeyBuffer ( const SecureKeyBuffer )
delete

Member Function Documentation

◆ data() [1/2]

uint8_t * signet::forge::crypto::SecureKeyBuffer::data ( )
inline

Definition at line 362 of file cipher_interface.hpp.

◆ data() [2/2]

const uint8_t * signet::forge::crypto::SecureKeyBuffer::data ( ) const
inline

Definition at line 361 of file cipher_interface.hpp.

◆ empty()

bool signet::forge::crypto::SecureKeyBuffer::empty ( ) const
inline

Definition at line 364 of file cipher_interface.hpp.

◆ operator=() [1/2]

SecureKeyBuffer & signet::forge::crypto::SecureKeyBuffer::operator= ( const SecureKeyBuffer )
delete

◆ operator=() [2/2]

SecureKeyBuffer & signet::forge::crypto::SecureKeyBuffer::operator= ( SecureKeyBuffer &&  other)
inlinenoexcept

Definition at line 350 of file cipher_interface.hpp.

◆ size()

size_t signet::forge::crypto::SecureKeyBuffer::size ( ) const
inline

Definition at line 363 of file cipher_interface.hpp.


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