123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::Encryption::EncryptingOnlyEncryptor

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Encryptor
Instance Chain:
self, Encryptor
Inherits: ActiveRecord::Encryption::Encryptor
Defined in: activerecord/lib/active_record/encryption/encrypting_only_encryptor.rb

Overview

An encryptor that can encrypt data but can’t decrypt it.

Constant Summary

Encryptor - Inherited

DECRYPT_ERRORS, ENCODING_ERRORS, THRESHOLD_TO_JUSTIFY_COMPRESSION

Class Method Summary

Encryptor - Inherited

.new

Options.

Instance Attribute Summary

Encryptor - Inherited

#binary?,
#compressor

The compressor to use for compressing the payload.

#compress?

Instance Method Summary

Encryptor - Inherited

#decrypt

Decrypts an encrypted_text and returns the result as clean text.

#encrypt

Encrypts clean_text and returns the encrypted result.

#encrypted?

Returns whether the text is encrypted or not.

#build_encrypted_message, #cipher, #compress,
#compress_if_worth_it

Under certain threshold, ZIP compression is actually worse that not compressing.

#default_key_provider, #deserialize_message, #force_encoding_if_needed, #forced_encoding_for_deterministic_encryption, #serialize_message, #serializer, #uncompress, #uncompress_if_needed, #validate_payload_type

Constructor Details

This class inherits a constructor from ActiveRecord::Encryption::Encryptor

Instance Method Details

#decrypt(encrypted_text, key_provider: nil, cipher_options: {})

[ GitHub ]

  
# File 'activerecord/lib/active_record/encryption/encrypting_only_encryptor.rb', line 7

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