Class: OpenSSL::Cipher::Cipher

Inherits:
Object
  • Object
show all
Defined in:
lib/openssl/cipher.rb

Instance Method Summary collapse

Instance Method Details

#random_ivObject



51
52
53
54
55
# File 'lib/openssl/cipher.rb', line 51

def random_iv
  str = OpenSSL::Random.random_bytes(self.iv_len)
  self.iv = str
  return str
end

#random_keyObject



45
46
47
48
49
# File 'lib/openssl/cipher.rb', line 45

def random_key
  str = OpenSSL::Random.random_bytes(self.key_len)
  self.key = str
  return str
end