Class: Bolt::Secret
- Inherits:
-
Object
- Object
- Bolt::Secret
- Defined in:
- lib/bolt/secret.rb,
lib/bolt/secret/base.rb
Defined Under Namespace
Classes: Base
Class Method Summary collapse
Class Method Details
.execute(plugins, outputter, options) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bolt/secret.rb', line 5 def self.execute(plugins, outputter, ) plugin = [:plugin] || 'pkcs7' case [:action] when 'createkeys' plugins.get_hook(plugin, :secret_createkeys).call when 'encrypt' encrypted = plugins.get_hook(plugin, :secret_encrypt).call('plaintext_value' => [:object]) outputter.(encrypted) when 'decrypt' decrypted = plugins.get_hook(plugin, :secret_decrypt).call('encrypted_value' => [:object]) outputter.(decrypted) end 0 end |