Sha256: 507838011ce4bc961d533d96fdc4f51bc4350c2a5da52171e8800af58238955d

Contents?: true

Size: 507 Bytes

Versions: 20

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module Encryption
    # An encryptor that won't decrypt or encrypt. It will just return the passed
    # values
    class NullEncryptor
      def encrypt(clean_text, key_provider: nil, cipher_options: {})
        clean_text
      end

      def decrypt(encrypted_text, key_provider: nil, cipher_options: {})
        encrypted_text
      end

      def encrypted?(text)
        false
      end

      def binary?
        false
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
activerecord-8.0.0 lib/active_record/encryption/null_encryptor.rb
activerecord-7.2.2 lib/active_record/encryption/null_encryptor.rb
activerecord-8.0.0.rc2 lib/active_record/encryption/null_encryptor.rb
activerecord-7.2.1.2 lib/active_record/encryption/null_encryptor.rb
activerecord-8.0.0.rc1 lib/active_record/encryption/null_encryptor.rb
activerecord-7.2.1.1 lib/active_record/encryption/null_encryptor.rb
activerecord-8.0.0.beta1 lib/active_record/encryption/null_encryptor.rb
omg-activerecord-8.0.0.alpha9 lib/active_record/encryption/null_encryptor.rb
omg-activerecord-8.0.0.alpha8 lib/active_record/encryption/null_encryptor.rb
omg-activerecord-8.0.0.alpha7 lib/active_record/encryption/null_encryptor.rb
omg-activerecord-8.0.0.alpha4 lib/active_record/encryption/null_encryptor.rb
omg-activerecord-8.0.0.alpha3 lib/active_record/encryption/null_encryptor.rb
omg-activerecord-8.0.0.alpha2 lib/active_record/encryption/null_encryptor.rb
omg-activerecord-8.0.0.alpha1 lib/active_record/encryption/null_encryptor.rb
activerecord-7.2.1 lib/active_record/encryption/null_encryptor.rb
activerecord-7.2.0 lib/active_record/encryption/null_encryptor.rb
activerecord-7.2.0.rc1 lib/active_record/encryption/null_encryptor.rb
activerecord-7.2.0.beta3 lib/active_record/encryption/null_encryptor.rb
activerecord-7.2.0.beta2 lib/active_record/encryption/null_encryptor.rb
activerecord-7.2.0.beta1 lib/active_record/encryption/null_encryptor.rb