Sha256: 630fb8d3f68dc38495247638d760bd9739d12479ff435a6efde73bde1892699a

Contents?: true

Size: 638 Bytes

Versions: 29

Compression:

Stored size: 638 Bytes

Contents

# frozen_string_literal: true

module Bolt
  class Secret
    def self.execute(plugins, outputter, options)
      plugin = options[:plugin] || 'pkcs7'
      case options[:action]
      when 'createkeys'
        plugins.get_hook(plugin, :secret_createkeys).call
      when 'encrypt'
        encrypted = plugins.get_hook(plugin, :secret_encrypt).call('plaintext_value' => options[:object])
        outputter.print_message(encrypted)
      when 'decrypt'
        decrypted = plugins.get_hook(plugin, :secret_decrypt).call('encrypted_value' => options[:object])
        outputter.print_message(decrypted)
      end

      0
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
bolt-2.7.0 lib/bolt/secret.rb
bolt-2.6.0 lib/bolt/secret.rb
bolt-2.5.0 lib/bolt/secret.rb
bolt-2.4.0 lib/bolt/secret.rb
bolt-2.3.1 lib/bolt/secret.rb
bolt-2.3.0 lib/bolt/secret.rb
bolt-2.2.0 lib/bolt/secret.rb
bolt-2.1.0 lib/bolt/secret.rb
bolt-2.0.1 lib/bolt/secret.rb
bolt-2.0.0 lib/bolt/secret.rb
bolt-1.49.0 lib/bolt/secret.rb
bolt-1.48.0 lib/bolt/secret.rb
bolt-1.47.0 lib/bolt/secret.rb
bolt-1.45.0 lib/bolt/secret.rb
bolt-1.44.0 lib/bolt/secret.rb
bolt-1.43.0 lib/bolt/secret.rb
bolt-1.42.0 lib/bolt/secret.rb
bolt-1.41.0 lib/bolt/secret.rb
bolt-1.40.0 lib/bolt/secret.rb
bolt-1.39.0 lib/bolt/secret.rb