module ActiveRecord::Encryption

Defined in:

active_record/encryption.cr
active_record/encryption/encryptor.cr
active_record/encryption/error.cr
active_record/encryption/key_generator.cr

Class Method Summary

Class Method Detail

def self.cipher_for(deterministic = false) #

def self.decryption_keys #

def self.deterministic_cipher : ActiveRecord::Encryption::Cipher #

def self.deterministic_cipher=(deterministic_cipher : ActiveRecord::Encryption::Cipher) #

def self.deterministic_encryption_key #

def self.deterministic_key : String #

Corresponds to Rails config.active_record.encryption.deterministic_key Enables deterministic encryption for queryable encrypted attributes.


def self.deterministic_key=(deterministic_key : String) #

Corresponds to Rails config.active_record.encryption.deterministic_key Enables deterministic encryption for queryable encrypted attributes.


def self.encryptor : ActiveRecord::Encryption::Encryptor #

def self.encryptor=(val) #

def self.key_derivation_salt : String #

Corresponds to Rails config.active_record.encryption.key_derivation_salt Used to derive encryption keys from the primary key. Defaults to "ActiveRecord Encryption" in Rails.


def self.key_derivation_salt=(key_derivation_salt : String) #

Corresponds to Rails config.active_record.encryption.key_derivation_salt Used to derive encryption keys from the primary key. Defaults to "ActiveRecord Encryption" in Rails.


def self.primary_cipher : ActiveRecord::Encryption::Cipher #

Used for non-deterministic encryption (default). Uses random IV.


def self.primary_cipher=(primary_cipher : ActiveRecord::Encryption::Cipher) #

Used for non-deterministic encryption (default). Uses random IV.


def self.primary_encryption_key #

def self.primary_key : String #

Corresponds to Rails config.active_record.encryption.primary_key See: https://guides.rubyonrails.org/active_record_encryption.html


def self.primary_key=(primary_key : String) #

Corresponds to Rails config.active_record.encryption.primary_key See: https://guides.rubyonrails.org/active_record_encryption.html


def self.primary_sha1_cipher : ActiveRecord::Encryption::Cipher #

Used for SHA1-based encryption (legacy support).


def self.primary_sha1_cipher=(primary_sha1_cipher : ActiveRecord::Encryption::Cipher) #

Used for SHA1-based encryption (legacy support).


def self.primary_sha1_encryption_key #