struct ActiveRecord::Encryption::KeyGenerator

Defined in:

active_record/encryption/key_generator.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(hash_digest : OpenSSL::Algorithm = OpenSSL::Algorithm::SHA256) #

Instance Method Detail

def derive_key_from(password, length = 32) #

Derives a key from the given password. The key will have a size in bytes of +:length+ (configured +Cipher+'s length by default)

The generated key will be salted with the value of +ActiveRecord::Encryption.key_derivation_salt+