A
Alex Ma
I'm looking at ruby code for a class, for which I can call a method but
which I don't find in the class source code.
I suppose this is a feature of Ruby that I have yet to learn.
Can anyone help me please?
Specifically, the class is Cipher in openssl module (fully qualified
class name s OpenSSL::Cipher::Cipher) and its source code in Ruby
library is:
class Cipher
def random_key
str = OpenSSL::Random.random_bytes(self.key_len)
self.key = str
return str
end
def random_iv
str = OpenSSL::Random.random_bytes(self.iv_len)
self.iv = str
return str
end
end
Where does this class defines the cipher method?
Thanks!
which I don't find in the class source code.
I suppose this is a feature of Ruby that I have yet to learn.
Can anyone help me please?
Specifically, the class is Cipher in openssl module (fully qualified
class name s OpenSSL::Cipher::Cipher) and its source code in Ruby
library is:
class Cipher
def random_key
str = OpenSSL::Random.random_bytes(self.key_len)
self.key = str
return str
end
def random_iv
str = OpenSSL::Random.random_bytes(self.iv_len)
self.iv = str
return str
end
end
Where does this class defines the cipher method?
Thanks!