aboutsummaryrefslogtreecommitdiff
path: root/src/hash/pjw.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
commitdae9e34168b56a399b2b1e04e657e322b9c6f803 (patch)
tree174eef159441750b71e720d6639b9b221502fd1c /src/hash/pjw.h
parent35c37ef1221d5860731435137059dc4533adff42 (diff)
all basic hash funcs
Diffstat (limited to 'src/hash/pjw.h')
-rw-r--r--src/hash/pjw.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/hash/pjw.h b/src/hash/pjw.h
index f1ab910..a4e36e7 100644
--- a/src/hash/pjw.h
+++ b/src/hash/pjw.h
@@ -1,5 +1,16 @@
#include "../lua.h"
#include <stdint.h>
+struct pjw_hash {
+ uint32_t hash, high;
+};
+
+struct pjw_hash pjw_init();
+void pjw_update(uint8_t*, size_t, struct pjw_hash*);
+uint32_t pjw_final(struct pjw_hash*);
uint32_t pjw(uint8_t* in, size_t len);
+
int l_pjw(lua_State*);
+int l_pjw_init(lua_State*);
+int l_pjw_update(lua_State*);
+int l_pjw_final(lua_State*);