class OpenSSL::Cipher

def random_iv

You must call cipher.encrypt or cipher.decrypt before calling this method.
Generate, set, and return a random iv.
def random_iv
  str = OpenSSL::Random.random_bytes(self.iv_len)
  self.iv = str
  return str
end

def random_iv

You must call cipher.encrypt or cipher.decrypt before calling this method.
Generate, set, and return a random iv.
def random_iv
  str = OpenSSL::Random.random_bytes(self.iv_len)
  self.iv = str
  return str
end

def random_key

You must call cipher.encrypt or cipher.decrypt before calling this method.
Generate, set, and return a random key.
def random_key
  str = OpenSSL::Random.random_bytes(self.key_len)
  self.key = str
  return str
end

def random_key

You must call cipher.encrypt or cipher.decrypt before calling this method.
Generate, set, and return a random key.
def random_key
  str = OpenSSL::Random.random_bytes(self.key_len)
  self.key = str
  return str
end