Class: Aws::S3::Encryption::DefaultKeyProvider Private
- Inherits:
-
Object
- Object
- Aws::S3::Encryption::DefaultKeyProvider
- Includes:
- KeyProvider
- Defined in:
- lib/aws-sdk-s3/encryption/default_key_provider.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
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.
Instance Method Summary collapse
- #encryption_materials ⇒ Materials private
-
#initialize(options = {}) ⇒ DefaultKeyProvider
constructor
private
A new instance of DefaultKeyProvider.
-
#key_for(materials_description) ⇒ Object
private
Returns the key given in the constructor.
Constructor Details
#initialize(options = {}) ⇒ DefaultKeyProvider
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of DefaultKeyProvider.
19 20 21 22 23 24 |
# File 'lib/aws-sdk-s3/encryption/default_key_provider.rb', line 19 def initialize( = {}) @encryption_materials = Materials.new( key: [:encryption_key], description: [:materials_description] || '{}' ) end |
Instance Method Details
#encryption_materials ⇒ Materials
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 |
# File 'lib/aws-sdk-s3/encryption/default_key_provider.rb', line 27 def encryption_materials @encryption_materials end |
#key_for(materials_description) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the key given in the constructor.
33 34 35 |
# File 'lib/aws-sdk-s3/encryption/default_key_provider.rb', line 33 def key_for(materials_description) @encryption_materials.key end |