Module: Ronin::Support::Crypto::Key::Methods::ClassMethods Private
- Defined in:
- lib/ronin/support/crypto/key/methods.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class-methods.
Instance Method Summary collapse
-
#load(key, **kwargs) ⇒ OpenSSL::PKey
Alias for #parse.
-
#load_file(path, **kwargs) ⇒ OpenSSL::PKey
Loads a key from a file.
-
#parse(key, password: nil) ⇒ OpenSSL::PKey
Parses an PEM encoded key.
-
#random(*arguments, &block) ⇒ Class<Methods>
private
Generates a new random key.
Instance Method Details
#load(key, **kwargs) ⇒ OpenSSL::PKey
Alias for #parse.
99 100 101 |
# File 'lib/ronin/support/crypto/key/methods.rb', line 99 def load(key,**kwargs) parse(key,**kwargs) end |
#load_file(path, **kwargs) ⇒ OpenSSL::PKey
Loads a key from a file.
120 121 122 |
# File 'lib/ronin/support/crypto/key/methods.rb', line 120 def load_file(path,**kwargs) parse(File.read(path),**kwargs) end |
#parse(key, password: nil) ⇒ OpenSSL::PKey
Parses an PEM encoded key.
76 77 78 |
# File 'lib/ronin/support/crypto/key/methods.rb', line 76 def parse(key, password: nil) new(key,*password) end |
#random(*arguments, &block) ⇒ Class<Methods>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Note:
Alias for generate
.
Generates a new random key.
58 59 60 |
# File 'lib/ronin/support/crypto/key/methods.rb', line 58 def random(*arguments,&block) generate(*arguments,&block) end |