19#ifndef __CWIST_DB_SYNC_H__
20#define __CWIST_DB_SYNC_H__
26#define CWIST_DB_SYNC_DEFAULT_PORT 9877
29#define CWIST_DB_SYNC_OK 0
30#define CWIST_DB_SYNC_ERR_ARGS (-1)
31#define CWIST_DB_SYNC_ERR_NET (-2)
32#define CWIST_DB_SYNC_ERR_CRYPTO (-3)
33#define CWIST_DB_SYNC_ERR_MEM (-4)
34#define CWIST_DB_SYNC_ERR_PROTO (-5)
67 unsigned char **out_bytes,
size_t *out_len);
Two-level key hierarchy for encrypting an SQLite database blob.
int cwist_db_sync_pull(const char *host, int port, const cwist_db_crypt_ctx_t *ctx, unsigned char **out_bytes, size_t *out_len)
Pull a database from a sync server.
int cwist_db_sync_serve(sqlite3 *db, const cwist_db_crypt_ctx_t *ctx, int port)
Serve the database once: accept one connection, send the sealed blob, then close.