summaryrefslogtreecommitdiffstats
path: root/ext/ipcrypt/ipcrypt.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ipcrypt/ipcrypt.h')
-rw-r--r--ext/ipcrypt/ipcrypt.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/ipcrypt/ipcrypt.h b/ext/ipcrypt/ipcrypt.h
new file mode 100644
index 0000000..76b94f5
--- /dev/null
+++ b/ext/ipcrypt/ipcrypt.h
@@ -0,0 +1,24 @@
+
+#ifndef ipcrypt_H
+#define ipcrypt_H
+
+#define IPCRYPT_BYTES 4
+#define IPCRYPT_KEYBYTES 16
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int ipcrypt_encrypt(unsigned char out[IPCRYPT_BYTES],
+ const unsigned char in[IPCRYPT_BYTES],
+ const unsigned char key[IPCRYPT_KEYBYTES]);
+
+int ipcrypt_decrypt(unsigned char out[IPCRYPT_BYTES],
+ const unsigned char in[IPCRYPT_BYTES],
+ const unsigned char key[IPCRYPT_KEYBYTES]);
+
+#ifdef __cplusplus
+} /* End of the 'extern "C"' block */
+#endif
+
+#endif