method

random_iv

random_iv()
public

Generate a random IV with OpenSSL::Random.random_bytes and sets it to the cipher, and returns it.

You must call #encrypt or #decrypt before calling this method.