method
generate_deterministic_iv
rails latest stable - Class:
ActiveRecord::Encryption::Cipher::Aes256Gcm
generate_deterministic_iv(clear_text)private
No documentation available.
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 95
def generate_deterministic_iv(clear_text)
OpenSSL::HMAC.digest(OpenSSL::Digest::SHA256.new, @secret, clear_text)[0, ActiveRecord::Encryption.cipher.iv_length]
end