method

random_key

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.