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