aboutsummaryrefslogtreecommitdiff
path: root/src/hash/md5.c
diff options
context:
space:
mode:
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);