Sha256: cacae329f6dc5d2fc3fc74b7105ec48c55671ddfe8b3bd7522e9079ab76e4699

Contents?: true

Size: 569 Bytes

Versions: 940

Compression:

Stored size: 569 Bytes

Contents

module Aws
  module S3
    module Encryption
      # @api private
      class IODecrypter

        # @param [OpenSSL::Cipher] cipher
        # @param [IO#write] io An IO-like object that responds to `#write`.
        def initialize(cipher, io)
          @cipher = cipher.clone
          @io = io
        end

        # @return [#write]
        attr_reader :io

        def write(chunk)
          # decrypt and write
          @io.write(@cipher.update(chunk))
        end

        def finalize
          @io.write(@cipher.final)
        end

      end
    end
  end
end

Version data entries

940 entries across 940 versions & 3 rubygems

Version Path
aws-sdk-resources-2.11.561 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.560 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.559 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.558 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.557 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.556 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.555 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.554 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.553 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.552 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.551 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.550 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.549 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.548 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.547 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.546 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.545 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.544 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.543 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb
aws-sdk-resources-2.11.542 lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb