Sha256: 5efae4d9a1a1e2c2a1f1da00e5b7c19b755b6521b0b2cd895675904a0933737e

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

class PgExport
  class Aes
    class Base
      include Logging

      def initialize(cipher)
        @cipher = cipher
      end

      private

      def copy_using(cipher, from:, to:)
        cipher.reset
        to.open(:write) do |f|
          from.each_chunk do |chunk|
            f << cipher.update(chunk)
          end
          f << cipher.final
        end
        self
      end

      attr_reader :cipher
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pg_export-0.5.1 lib/pg_export/services/aes/base.rb
pg_export-0.5.0 lib/pg_export/services/aes/base.rb