random_key()
public
Generate, set, and return a random key. You must call cipher.encrypt or cipher.decrypt before calling this method.
# File ext/openssl/lib/openssl/cipher.rb, line 46
def random_key
str = OpenSSL::Random.random_bytes(self.key_len)
self.key = str
return str
end