Sha256: 4d0fa219e3f2b1dc80d22eaa78827b169e317706eb8421d576ae95a20219acee
Contents?: true
Size: 1.16 KB
Versions: 212
Compression:
Stored size: 1.16 KB
Contents
# frozen_string_literal: true module Aws module S3 module EncryptionV2 # 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 class DefaultKeyProvider include KeyProvider # @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. def initialize(options = {}) @encryption_materials = Materials.new( key: options[:encryption_key], description: options[:materials_description] || '{}' ) end # @return [Materials] def encryption_materials @encryption_materials end # @param [String<JSON>] materials_description # @return Returns the key given in the constructor. def key_for(materials_description) @encryption_materials.key end end end end end
Version data entries
212 entries across 212 versions & 2 rubygems