diff --git a/lualib-src/lua-crypt.c b/lualib-src/lua-crypt.c index e34a939a..6f99d4f6 100644 --- a/lualib-src/lua-crypt.c +++ b/lualib-src/lua-crypt.c @@ -961,7 +961,7 @@ luaopen_skynet_crypt(lua_State *L) { if (!init) { // Don't need call srandom more than once. init = 1 ; - srandom((time(NULL) << 16) ^ getpid()); + srandom((random() << 8) ^ (time(NULL) << 16) ^ getpid()); } luaL_Reg l[] = { { "hashkey", lhashkey },