summaryrefslogtreecommitdiff
path: root/core/src/xmake/engine.c
diff options
context:
space:
mode:
authorruki <[email protected]>2025-10-01 00:47:56 +0800
committerruki <[email protected]>2025-10-01 00:47:56 +0800
commit9dc8bb99439f4d31e3563a5865764798c2094e8e (patch)
tree911e222e99d1df86804f1380940f829045fbe97b /core/src/xmake/engine.c
parent672470e6e4ea7fd150354c131ba5fb60f7331643 (diff)
improve random hash
Diffstat (limited to 'core/src/xmake/engine.c')
-rw-r--r--core/src/xmake/engine.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c
index 203fc1d49..c3f8e9f5c 100644
--- a/core/src/xmake/engine.c
+++ b/core/src/xmake/engine.c
@@ -225,6 +225,9 @@ tb_int_t xm_hash_uuid4(lua_State* lua);
tb_int_t xm_hash_sha(lua_State* lua);
tb_int_t xm_hash_md5(lua_State* lua);
tb_int_t xm_hash_xxhash(lua_State* lua);
+tb_int_t xm_hash_rand32(lua_State* lua);
+tb_int_t xm_hash_rand64(lua_State* lua);
+tb_int_t xm_hash_rand128(lua_State* lua);
// the base64 functions
tb_int_t xm_base64_encode(lua_State* lua);
@@ -518,11 +521,14 @@ static luaL_Reg const g_path_functions[] =
// the hash functions
static luaL_Reg const g_hash_functions[] =
{
- { "uuid4", xm_hash_uuid4 }
-, { "sha", xm_hash_sha }
-, { "md5", xm_hash_md5 }
-, { "xxhash", xm_hash_xxhash }
-, { tb_null, tb_null }
+ { "uuid4", xm_hash_uuid4 }
+, { "sha", xm_hash_sha }
+, { "md5", xm_hash_md5 }
+, { "xxhash", xm_hash_xxhash }
+, { "rand32", xm_hash_rand32 }
+, { "rand64", xm_hash_rand64 }
+, { "rand128", xm_hash_rand128 }
+, { tb_null, tb_null }
};
// the base64 functions