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::EncryptionTypes Class Reference

Public Types

enum  CipherType : uint8_t { INVALID = 0 , GCM = 1 , CTR = 2 , CBC = 3 }
 
enum  KeyDerivationFunction : uint8_t { DEFAULT = 0 , SHA256 = 1 , PBKDF2 = 2 }
 
enum  Mode { ENCRYPT , DECRYPT }
 
enum  EncryptionVersion : uint8_t { V0_0 = 0 , V0_1 = 1 , NONE = 127 }
 

Static Public Member Functions

static string CipherToString (CipherType cipher_p)
 
static CipherType StringToCipher (const string &encryption_cipher_p)
 
static string KDFToString (KeyDerivationFunction kdf_p)
 
static KeyDerivationFunction StringToKDF (const string &key_derivation_function_p)
 
static EncryptionVersion StringToVersion (const string &encryption_version_p)
 

Member Enumeration Documentation

◆ CipherType

enum duckdb::EncryptionTypes::CipherType : uint8_t
10897: uint8_t { INVALID = 0, GCM = 1, CTR = 2, CBC = 3 };
::uint8_t uint8_t

◆ KeyDerivationFunction

enum duckdb::EncryptionTypes::KeyDerivationFunction : uint8_t
10898: uint8_t { DEFAULT = 0, SHA256 = 1, PBKDF2 = 2 };

◆ Mode

enum duckdb::EncryptionTypes::Mode
10899{ ENCRYPT, DECRYPT };

◆ EncryptionVersion

enum duckdb::EncryptionTypes::EncryptionVersion : uint8_t
10900: uint8_t { V0_0 = 0, V0_1 = 1, NONE = 127 };

Member Function Documentation

◆ CipherToString()

string duckdb::EncryptionTypes::CipherToString ( CipherType  cipher_p)
static
52301 {
52302 switch (cipher_p) {
52303 case GCM:
52304 return "GCM";
52305 case CTR:
52306 return "CTR";
52307 case CBC:
52308 return "CBC";
52309 default:
52310 return "INVALID";
52311 }
52312}

◆ StringToCipher()

EncryptionTypes::CipherType duckdb::EncryptionTypes::StringToCipher ( const string &  encryption_cipher_p)
static
52314 {
52315 auto encryption_cipher = StringUtil::Upper(encryption_cipher_p);
52316 if (encryption_cipher == "GCM") {
52317 return GCM;
52318 }
52319 if (encryption_cipher == "CTR") {
52320 return CTR;
52321 }
52322 if (encryption_cipher == "CBC") {
52323 throw NotImplementedException("CBC encryption is disabled");
52324 }
52325 return INVALID;
52326}
static DUCKDB_API string Upper(const string &str)
Convert a string to UPPERCASE.

◆ KDFToString()

string duckdb::EncryptionTypes::KDFToString ( KeyDerivationFunction  kdf_p)
static
52339 {
52340 switch (kdf_p) {
52341 case SHA256:
52342 return "SHA256";
52343 case PBKDF2:
52344 return "PBKDF2";
52345 default:
52346 return "DEFAULT";
52347 }
52348}

◆ StringToKDF()

EncryptionTypes::KeyDerivationFunction duckdb::EncryptionTypes::StringToKDF ( const string &  key_derivation_function_p)
static
52350 {
52351 auto key_derivation_function = StringUtil::Upper(key_derivation_function_p);
52352 if (key_derivation_function == "SHA256") {
52353 return SHA256;
52354 }
52355 if (key_derivation_function == "PBKDF2") {
52356 return PBKDF2;
52357 }
52358 return DEFAULT;
52359}

◆ StringToVersion()

EncryptionTypes::EncryptionVersion duckdb::EncryptionTypes::StringToVersion ( const string &  encryption_version_p)
static
52328 {
52329 if (encryption_version_p == "v0") {
52330 return V0_0;
52331 } else if (encryption_version_p == "v1") {
52332 return V0_1;
52333 } else {
52334 throw NotImplementedException("No encryption version higher then v%d is supported yet in this DuckDB version",
52335 MAX_VERSION);
52336 }
52337}

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