Enigma
3.2.0
A Simple, Reliable and Efficient Encryption Tool
|
#include <Database.hpp>
Public Types | |
enum class | OrderBy : byte { ID , Title , DateTime , Size } |
enum class | Order : byte { Ascending , Descending } |
Static Public Member Functions | |
static void | initialize () |
static void | shutdown () |
static std::int64_t | addEncryption (const std::unique_ptr< Encryption > &e) |
static std::int64_t | addCipherChunk (const std::unique_ptr< CipherChunk > &cc) |
static std::unique_ptr< Encryption > | getEncryption (const std::int64_t ide) |
static std::unique_ptr< CipherChunk > | getCipherChunk (const std::int64_t ide) |
static void | getCipherChunks (const std::int64_t ide, const std::function< bool(std::unique_ptr< CipherChunk > &&cc)> &callback) |
static std::vector< std::unique_ptr< Encryption > > | getAllEncryptions (const OrderBy order_by=OrderBy::ID, const Order order=Order::Descending) |
static bool | deleteEncryption (const std::int64_t ide) |
static bool | deleteAllEncryptions () |
static std::vector< std::unique_ptr< Encryption > > | searchEncryptionsByTitle (const std::string &qtitle, OrderBy order_by=OrderBy::ID, Order order=Order::Descending) |
static const std::unique_ptr< SQLite::Database > & | getStorage () noexcept |
static void | Vacuum () noexcept |
static void | Export (const fs::path &filename) |
static void | Import (const fs::path &filename) |
Friends | |
const char * | operator* (OrderBy order_by) |
std::ostream & | operator<< (std::ostream &os, const OrderBy order_by) noexcept |
const char * | operator* (Order order) |
std::ostream & | operator<< (std::ostream &os, const Order order) noexcept |
Enigma SQLite database to store and retrieve encryption records User can export and import Database file to clouds or drives Database file will store Encrypted Text and Encrypted Files ciphers and other info
Definition at line 23 of file Database.hpp.
|
strong |
Encryption Table order column
Enumerator | |
---|---|
Ascending | |
Descending |
Definition at line 73 of file Database.hpp.
|
strong |
Encryption Table order by column
Enumerator | |
---|---|
ID | |
Title | |
DateTime | |
Size |
Definition at line 29 of file Database.hpp.
|
static |
Add CipherChunk record to database table
ide | Encryption id this CipherChunk belongs to |
|
static |
Add Encryption record to database table
|
static |
Delete all Encryption records by id, returns true if successfully deleted Note: all associated CipherChunks with all encryptions will be automatically deleted due ON DELETE CASCADE
|
static |
Delete Encryption record by id, returns true if successfully deleted Note: all associated CipherChunks with this encryption will be automatically deleted due ON DELETE CASCADE
|
static |
|
static |
Get a CipherChunk by Encryption id
|
static |
Get a CipherChunk by Encryption id Used for small text encryptions
|
static |
Get CipherChunks iteratively by Encryption id, ordered by offset from 0 -> LAST Used for large files encryptions
|
static |
Get an Encryption by id
|
inlinestaticnoexcept |
Returns SQLite database connection instance
Definition at line 152 of file Database.hpp.
|
static |
|
static |
Initializes SQLite database connection
|
static |
Search Encryptions by title using keyword LIKE QUERY%
|
static |
Shuts down SQLite connection
|
staticnoexcept |
Cleans up allocated disk space for deleted data, blob...
When you insert or delete data from the tables, the indexes and tables become fragmented, especially for the database that has a high number of inserts, updates, and deletes.
|
friend |
To help stringify enum Order
Definition at line 80 of file Database.hpp.
|
friend |
To help stringify enum OrderBy
Definition at line 38 of file Database.hpp.
|
friend |
Definition at line 93 of file Database.hpp.
|
friend |
Definition at line 52 of file Database.hpp.