|
Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
|
Data encryption and key management. More...
#include <secure_connection.h>

Public Member Functions | |
| encryption_manager ()=default | |
| Default constructor - used by database_context. | |
| std::string | encrypt_field_data (const std::string &data, const std::string &field_name) const |
| std::string | decrypt_field_data (const std::string &encrypted_data, const std::string &field_name) const |
| bool | generate_field_key (const std::string &field_name) |
| bool | rotate_field_key (const std::string &field_name) |
| void | set_master_encryption_key (const std::string &key) |
| bool | configure_encrypted_column (const std::string &table, const std::string &column, encryption_type type) |
| bool | is_column_encrypted (const std::string &table, const std::string &column) const |
Private Member Functions | |
| std::string | derive_key (const std::string &field_name) const |
Private Attributes | |
| std::mutex | encryption_mutex_ |
| std::string | master_key_ |
| std::unordered_map< std::string, std::string > | field_keys_ |
| std::unordered_map< std::string, encryption_type > | encrypted_columns_ |
Data encryption and key management.
Example:
Definition at line 395 of file secure_connection.h.
|
default |
Default constructor - used by database_context.
| bool database::security::encryption_manager::configure_encrypted_column | ( | const std::string & | table, |
| const std::string & | column, | ||
| encryption_type | type ) |
Definition at line 642 of file secure_connection.cpp.
References encrypted_columns_, encryption_mutex_, and field_keys_.
| std::string database::security::encryption_manager::decrypt_field_data | ( | const std::string & | encrypted_data, |
| const std::string & | field_name ) const |
Definition at line 499 of file secure_connection.cpp.
References derive_key(), and encryption_mutex_.

|
private |
Definition at line 685 of file secure_connection.cpp.
References field_keys_, and master_key_.
Referenced by decrypt_field_data(), and encrypt_field_data().

| std::string database::security::encryption_manager::encrypt_field_data | ( | const std::string & | data, |
| const std::string & | field_name ) const |
Definition at line 433 of file secure_connection.cpp.
References derive_key(), and encryption_mutex_.

| bool database::security::encryption_manager::generate_field_key | ( | const std::string & | field_name | ) |
Definition at line 579 of file secure_connection.cpp.
References encryption_mutex_, and field_keys_.
| bool database::security::encryption_manager::is_column_encrypted | ( | const std::string & | table, |
| const std::string & | column ) const |
Definition at line 677 of file secure_connection.cpp.
References encrypted_columns_, and encryption_mutex_.
| bool database::security::encryption_manager::rotate_field_key | ( | const std::string & | field_name | ) |
Definition at line 605 of file secure_connection.cpp.
References encryption_mutex_, and field_keys_.
| void database::security::encryption_manager::set_master_encryption_key | ( | const std::string & | key | ) |
Definition at line 636 of file secure_connection.cpp.
References encryption_mutex_, and master_key_.
|
private |
Definition at line 423 of file secure_connection.h.
Referenced by configure_encrypted_column(), and is_column_encrypted().
|
mutableprivate |
Definition at line 420 of file secure_connection.h.
Referenced by configure_encrypted_column(), decrypt_field_data(), encrypt_field_data(), generate_field_key(), is_column_encrypted(), rotate_field_key(), and set_master_encryption_key().
|
private |
Definition at line 422 of file secure_connection.h.
Referenced by configure_encrypted_column(), derive_key(), generate_field_key(), and rotate_field_key().
|
private |
Definition at line 421 of file secure_connection.h.
Referenced by derive_key(), and set_master_encryption_key().