Module: MuchKeys::CLI::MuchKeysExecutor
Instance Method Summary collapse
- #decrypt(consul_key, public_key, private_key) ⇒ Object
- #encrypt(file, public_key) ⇒ Object
- #fetch(consul_key) ⇒ Object
Instance Method Details
#decrypt(consul_key, public_key, private_key) ⇒ Object
42 43 44 |
# File 'lib/muchkeys/cli.rb', line 42 def decrypt(consul_key, public_key, private_key) MuchKeys.fetch_key(consul_key, public_key: public_key, private_key:private_key) end |
#encrypt(file, public_key) ⇒ Object
37 38 39 40 |
# File 'lib/muchkeys/cli.rb', line 37 def encrypt(file, public_key) string_to_encrypt = File.read(file) MuchKeys::Secret.encrypt_string(string_to_encrypt, public_key) end |