EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of the sqlite crypt writer utilities. More...
#include <stdint.h>
#include <sqlite3.h>
#include "sqlite_crypt_writer.h"
#include "../utils/allocs.h"
#include "../utils/log.h"
#include "../utils/os.h"
#include "../utils/sqliteu.h"
Functions | |
int | open_sqlite_crypt_db (const char *db_path, sqlite3 **sql) |
Opens the sqlite crypt db. More... | |
void | free_sqlite_crypt_db (sqlite3 *db) |
Closes the sqlite db. More... | |
int | save_sqlite_store_entry (sqlite3 *db, struct store_row *row) |
Save a store entry into the sqlite db. More... | |
int | save_sqlite_secrets_entry (sqlite3 *db, struct secrets_row *row) |
Save a secrets entry into the sqlite db. More... | |
void | free_sqlite_store_row (struct store_row *row) |
Frees a store row entry. More... | |
struct store_row * | get_sqlite_store_row (sqlite3 *db, const char *key) |
Get the sqlite store entry object. More... | |
void | free_sqlite_secrets_row (struct secrets_row *row) |
Frees a secrets row entry. More... | |
struct secrets_row * | get_sqlite_secrets_row (sqlite3 *db, const char *id) |
Get the sqlite secrets entry object. More... | |
File containing the implementation of the sqlite crypt writer utilities.
void free_sqlite_crypt_db | ( | sqlite3 * | db | ) |
Closes the sqlite db.
db | The sqlite db structure pointer |
void free_sqlite_secrets_row | ( | struct secrets_row * | row | ) |
Frees a secrets row entry.
row | The secrets row value |
void free_sqlite_store_row | ( | struct store_row * | row | ) |
Frees a store row entry.
row | The store row value |
struct secrets_row* get_sqlite_secrets_row | ( | sqlite3 * | db, |
const char * | id | ||
) |
Get the sqlite secrets entry object.
db | The sqlite db structure pointer |
id | The secrets column id |
struct store_row* get_sqlite_store_row | ( | sqlite3 * | db, |
const char * | key | ||
) |
Get the sqlite store entry object.
db | The sqlite db structure pointer |
key | The store column key |
int open_sqlite_crypt_db | ( | const char * | db_path, |
sqlite3 ** | sql | ||
) |
Opens the sqlite crypt db.
db_path | The sqlite db path | |
[out] | sql | The returned sqlite db structure pointer |
int save_sqlite_secrets_entry | ( | sqlite3 * | db, |
struct secrets_row * | row | ||
) |
Save a secrets entry into the sqlite db.
db | The sqlite db structure pointer |
row | The secrets row structure |
int save_sqlite_store_entry | ( | sqlite3 * | db, |
struct store_row * | row | ||
) |
Save a store entry into the sqlite db.
db | The sqlite db structure pointer |
row | The store row structure |