random_key()
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.
# File ext/openssl/lib/openssl/cipher.rb, line 43 def random_key str = OpenSSL::Random.random_bytes(self.key_len) self.key = str end