aboutsummaryrefslogtreecommitdiff
path: root/src/hash/md5.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-09-30 02:17:37 -0500
committerame <[email protected]>2024-09-30 02:17:37 -0500
commitf648ac9db35f49f3dbd7373cc230f680c55cc04a (patch)
tree2a9fafd40359419d36504b55e6041a9fdda23bc6 /src/hash/md5.c
parent1cc24fda87c3e8df90a5ea2d526ce39adf4a7648 (diff)
parentfe33c0e979ebfc41c3eb9f561589f0d5d8810aaf (diff)
what
Diffstat (limited to 'src/hash/md5.c')
-rw-r--r--src/hash/md5.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/hash/md5.c b/src/hash/md5.c
index 1b3f508..45844f2 100644
--- a/src/hash/md5.c
+++ b/src/hash/md5.c
@@ -134,7 +134,14 @@ void md5_final(struct md5_hash* hash, char out_stream[64]){
}
-common_hash_clone(md5);
+//common_hash_clone(md5);
+lua_common_hash_clone_oargs(md5, md5, l_md5_init(L), {
+ uint8_t* old = b->buffer;
+ *b = *a;
+ b->buffer = old;
+ memcpy(b->buffer, a->buffer, bs * sizeof * b->buffer);
+});
+
lua_common_hash_init_ni(md5, md5, md5_init_l(L));
lua_common_hash_update(md5, md5);
//common_hash_init_update(md5);