Class: Aws::S3::Encryption::IODecrypter Private
- Inherits:
-
Object
- Object
- Aws::S3::Encryption::IODecrypter
- Defined in:
- lib/aws-sdk-s3/encryption/io_decrypter.rb
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.
Instance Attribute Summary collapse
- #io ⇒ #write readonly private
Instance Method Summary collapse
- #finalize ⇒ Object private
-
#initialize(cipher, io) ⇒ IODecrypter
constructor
private
A new instance of IODecrypter.
- #write(chunk) ⇒ Object private
Constructor Details
#initialize(cipher, io) ⇒ IODecrypter
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 IODecrypter.
9 10 11 12 |
# File 'lib/aws-sdk-s3/encryption/io_decrypter.rb', line 9 def initialize(cipher, io) @cipher = cipher.clone @io = io end |
Instance Attribute Details
#io ⇒ #write (readonly)
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.
15 16 17 |
# File 'lib/aws-sdk-s3/encryption/io_decrypter.rb', line 15 def io @io end |
Instance Method Details
#finalize ⇒ 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.
22 23 24 |
# File 'lib/aws-sdk-s3/encryption/io_decrypter.rb', line 22 def finalize @io.write(@cipher.final) end |
#write(chunk) ⇒ 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.
17 18 19 20 |
# File 'lib/aws-sdk-s3/encryption/io_decrypter.rb', line 17 def write(chunk) # decrypt and write @io.write(@cipher.update(chunk)) end |