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.
17 18 19 20 21 22 |
# File 'lib/aws-sdk-s3/encryption/default_key_provider.rb', line 17 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.
25 26 27 |
# File 'lib/aws-sdk-s3/encryption/default_key_provider.rb', line 25 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.
31 32 33 |
# File 'lib/aws-sdk-s3/encryption/default_key_provider.rb', line 31 def key_for(materials_description) @encryption_materials.key end |