class ActiveRecord::Snapshot::OpenSSL

Public Class Methods

decrypt(input:, output:) click to toggle source
# File lib/active_record/snapshot/commands/openssl.rb, line 13
      def self.decrypt(input:, output:)
        system(<<-SH)
        nice openssl enc -d -aes-256-cbc -md sha256 \\
          -in #{input} \\
          -out #{output} \\
          -kfile #{ActiveRecord::Snapshot.config.ssl_key}
        SH
      end
encrypt(input:, output:) click to toggle source
# File lib/active_record/snapshot/commands/openssl.rb, line 4
      def self.encrypt(input:, output:)
        system(<<-SH)
        nice openssl aes-256-cbc -md sha256 \\
          -in #{input} \\
          -out #{output} \\
          -kfile #{ActiveRecord::Snapshot.config.ssl_key}
        SH
      end