Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
OpenSSL::Random.seed
(::String seed) -> ::String
seed(str) → str
ext/openssl/ossl_rand.c
View on GitHub ↗
static VALUE
ossl_rand_seed(VALUE self, VALUE str)
{
StringValue(str);
RAND_seed(RSTRING_PTR(str), RSTRING_LENINT(str));
return str;
}
::seed is equivalent to ::add where entropy is length of str.
See also
.random_bytes
.status?
.random_add
.write_random_file
also in
4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0