aboutsummaryrefslogtreecommitdiff
path: root/src/hash/xor.h
diff options
context:
space:
mode:
authorame <[email protected]>2024-04-04 10:06:53 -0500
committerame <[email protected]>2024-04-04 10:06:53 -0500
commitb8b5f8c7725d7431b82cb065b2b18891c1bc3fc9 (patch)
tree174eef159441750b71e720d6639b9b221502fd1c /src/hash/xor.h
parentcb280d5d1816ddbe0587775def896ab9c237bc4f (diff)
all basic hash funcs
Diffstat (limited to 'src/hash/xor.h')
-rw-r--r--src/hash/xor.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/hash/xor.h b/src/hash/xor.h
index bd9aaed..6065524 100644
--- a/src/hash/xor.h
+++ b/src/hash/xor.h
@@ -1,12 +1,16 @@
#include "../lua.h"
#include <stdint.h>
-/**
- * calculates a xor hash of (len) bytes
- *
- * @param {uint8_t*} input bytes
- * @param {size_t} input length
- * @return {uint8_t} 8 bit checksum
-*/
+
+struct xor8_hash {
+ uint8_t a;
+};
+
+struct xor8_hash xor8_init();
+void xor8_update(uint8_t*, size_t, struct xor8_hash*);
+uint8_t xor8_final(struct xor8_hash*);
uint8_t xor8(uint8_t*, size_t);
int l_xor8(lua_State*);
+int l_xor8_init(lua_State*);
+int l_xor8_update(lua_State*);
+int l_xor8_final(lua_State*); \ No newline at end of file