Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::EncryptionKey Class Reference

Public Member Functions

 EncryptionKey (data_ptr_t encryption_key)
 
 EncryptionKey (const EncryptionKey &)=delete
 
EncryptionKeyoperator= (const EncryptionKey &)=delete
 
 EncryptionKey (EncryptionKey &&) noexcept=default
 
EncryptionKeyoperator= (EncryptionKey &&) noexcept=default
 
const_data_ptr_t GetPtr () const
 
data_ptr_t GetData ()
 

Static Public Member Functions

static void LockEncryptionKey (data_ptr_t key, idx_t key_len=MainHeader::DEFAULT_ENCRYPTION_KEY_LENGTH)
 
static void UnlockEncryptionKey (data_ptr_t key, idx_t key_len=MainHeader::DEFAULT_ENCRYPTION_KEY_LENGTH)
 

Private Attributes

data_t key [MainHeader::DEFAULT_ENCRYPTION_KEY_LENGTH]
 

Constructor & Destructor Documentation

◆ EncryptionKey()

duckdb::EncryptionKey::EncryptionKey ( data_ptr_t  encryption_key)
explicit
52116 {
52117 // Lock the encryption key
52118 memcpy(key, encryption_key_p, MainHeader::DEFAULT_ENCRYPTION_KEY_LENGTH);
52119 D_ASSERT(memcmp(key, encryption_key_p, MainHeader::DEFAULT_ENCRYPTION_KEY_LENGTH) == 0);
52120
52121 // zero out the encryption key in memory
52122 duckdb_mbedtls::MbedTlsWrapper::AESStateMBEDTLS::SecureClearData(encryption_key_p,
52124 LockEncryptionKey(key);
52125}
static constexpr uint64_t DEFAULT_ENCRYPTION_KEY_LENGTH
The encryption key length.
Definition duckdb.hpp:9749

◆ ~EncryptionKey()

duckdb::EncryptionKey::~EncryptionKey ( )
52128 {
52129 UnlockEncryptionKey(key);
52130}

Member Function Documentation

◆ GetPtr()

const_data_ptr_t duckdb::EncryptionKey::GetPtr ( ) const
inline
51726 {
51727 return key;
51728 }

◆ GetData()

data_ptr_t duckdb::EncryptionKey::GetData ( )
inline
51730 {
51731 return key;
51732 }

◆ LockEncryptionKey()

void duckdb::EncryptionKey::LockEncryptionKey ( data_ptr_t  key,
idx_t  key_len = MainHeader::DEFAULT_ENCRYPTION_KEY_LENGTH 
)
static
52132 {
52133#if defined(_WIN32)
52134 VirtualLock(key, key_len);
52135#elif defined(__MVS__)
52136 __mlockall(_BPX_NONSWAP);
52137#else
52138 mlock(key, key_len);
52139#endif
52140}

◆ UnlockEncryptionKey()

void duckdb::EncryptionKey::UnlockEncryptionKey ( data_ptr_t  key,
idx_t  key_len = MainHeader::DEFAULT_ENCRYPTION_KEY_LENGTH 
)
static
52142 {
52143 duckdb_mbedtls::MbedTlsWrapper::AESStateMBEDTLS::SecureClearData(key, key_len);
52144#if defined(_WIN32)
52145 VirtualUnlock(key, key_len);
52146#elif defined(__MVS__)
52147 __mlockall(_BPX_SWAP);
52148#else
52149 munlock(key, key_len);
52150#endif
52151}

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