module OpenSSLExtensions::PKey::PKey
Extends OpenSSL::PKey::PKey and its submodules with helper methods.
Constants
- UnknownAlgorithmError
Public Instance Methods
==(other)
click to toggle source
Equality is tested by comparing the instances’ hash
.
# File lib/openssl-extensions/pkey/pkey.rb, line 13 def ==(other) other.kind_of?(OpenSSL::PKey::PKey) && self.hash == other.hash end
Also aliased as: eql?
hash()
click to toggle source
Override the default Object#hash to identify uniqueness of the key. This uses a hash of the PEM.
# File lib/openssl-extensions/pkey/pkey.rb, line 23 def hash to_pem.hash end
strength()
click to toggle source
Returns the strength of the public key in number of bits.
# File lib/openssl-extensions/pkey/pkey.rb, line 30 def strength raise UnknownAlgorithmError end