# HG changeset patch # User Kim Alvefur # Date 1484908411 -3600 # Node ID 1dfa5847d49e4f0f9eaddb3406ff9e6233c60b41 # Parent 56552733742e2f315f25420116d929f874be56d4 util.crand: Remove seeding diff -r 56552733742e -r 1dfa5847d49e util-src/crand.c --- a/util-src/crand.c Fri Jan 20 11:52:46 2017 +0100 +++ b/util-src/crand.c Fri Jan 20 11:33:31 2017 +0100 @@ -77,22 +77,6 @@ return 1; } -#ifdef ENABLE_SEEDING -int Lseed(lua_State *L) { - size_t len; - const char *seed = lua_tolstring(L, 1, &len); - -#if defined(WITH_OPENSSL) - RAND_add(seed, len, len); - return 0; -#else - lua_pushnil(L); - lua_pushliteral(L, "not-supported"); - return 2; -#endif -} -#endif - int luaopen_util_crand(lua_State *L) { #if (LUA_VERSION_NUM > 501) luaL_checkversion(L); @@ -100,10 +84,6 @@ lua_newtable(L); lua_pushcfunction(L, Lrandom); lua_setfield(L, -2, "bytes"); -#ifdef ENABLE_SEEDING - lua_pushcfunction(L, Lseed); - lua_setfield(L, -2, "seed"); -#endif #if defined(WITH_GETRANDOM) lua_pushstring(L, "Linux");