method
random_key
v2_6_3 -
Show latest stable
- Class:
OpenSSL::Cipher
random_key()public
Generate a random key with OpenSSL::Random.random_bytes and sets it to the cipher, and returns it.
You must call #encrypt or #decrypt before calling this method.