aboutsummaryrefslogtreecommitdiffstats
path: root/src/contrib/sqlite/codec_c_interface.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-07 00:30:03 +0000
committerlloyd <[email protected]>2014-01-07 00:30:03 +0000
commit52d3fd79aac9decf6cb0ef617e7638abe7ebd053 (patch)
treecdc9079db267ff5eea72f609cbd82f9985c631bc /src/contrib/sqlite/codec_c_interface.h
parent76efeb142e5da153bd6d98939754f714a5ecd550 (diff)
Move python to src, add to main makefile
Diffstat (limited to 'src/contrib/sqlite/codec_c_interface.h')
-rw-r--r--src/contrib/sqlite/codec_c_interface.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/src/contrib/sqlite/codec_c_interface.h b/src/contrib/sqlite/codec_c_interface.h
new file mode 100644
index 000000000..1d8c8706f
--- /dev/null
+++ b/src/contrib/sqlite/codec_c_interface.h
@@ -0,0 +1,90 @@
+/*
+ * Encryption codec class C interface
+ * (C) 2010 Olivier de Gaalon
+ *
+ * Distributed under the terms of the Botan license
+ */
+
+#ifndef _CODEC_C_INTERFACE_H_
+#define _CODEC_C_INTERFACE_H_
+
+#ifdef __cplusplus
+typedef unsigned char Bool;
+#endif
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void InitializeBotan();
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void* InitializeNewCodec(void *db);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void* InitializeFromOtherCodec(const void *otherCodec, void *db);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void GenerateWriteKey(void *codec, const char *userPassword, int passwordLength);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void DropWriteKey(void *codec);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void SetWriteIsRead(void *codec);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void SetReadIsWrite(void *codec);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+unsigned char* Encrypt(void *codec, int page, unsigned char *data, Bool useWriteKey);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void Decrypt(void *codec, int page, unsigned char *data);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void SetPageSize(void *codec, int pageSize);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+Bool HasReadKey(void *codec);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+Bool HasWriteKey(void *codec);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void* GetDB(void *codec);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+const char* GetAndResetError(void *codec);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void DeleteCodec(void *codec);
+
+#endif \ No newline at end of file