method
random_bytes
v2_5_5 -
Show latest stable
- Class:
OpenSSL::Random
random_bytes(p1)public
Generates a String with length number of cryptographically strong pseudo-random bytes.
Example
OpenSSL::Random.random_bytes(12) #=> "..."
random_bytes(p1)Generates a String with length number of cryptographically strong pseudo-random bytes.
OpenSSL::Random.random_bytes(12) #=> "..."