class Aws::S3::Encryption::DefaultKeyProvider

The default key provider is constructed with a single key that is used for both encryption and decryption, ignoring the possible per-object envelope encryption materials description. @api private

Public Class Methods

new(options = {}) click to toggle source

@option options [required, OpenSSL::PKey::RSA, String] :encryption_key

The master key to use for encrypting objects.

@option options [String<JSON>] :materials_description ('{}')

A description of the encryption key.
# File lib/aws-sdk-resources/services/s3/encryption/default_key_provider.rb, line 17
def initialize(options = {})
  @encryption_materials = Materials.new(
    key: options[:encryption_key],
    description: options[:materials_description] || '{}'
  )
end

Public Instance Methods

encryption_materials() click to toggle source

@return [Materials]

# File lib/aws-sdk-resources/services/s3/encryption/default_key_provider.rb, line 25
def encryption_materials
  @encryption_materials
end
key_for(materials_description) click to toggle source

@param [String<JSON>] materials_description @return Returns the key given in the constructor.

# File lib/aws-sdk-resources/services/s3/encryption/default_key_provider.rb, line 31
def key_for(materials_description)
  @encryption_materials.key
end