Skip to content

Commit 595aac9

Browse files
committed
Switch encryption algorithm to SHA1
1 parent 14da70f commit 595aac9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Rails used SHA1 to encrypt attributes before, now it uses SHA256
2+
# TODO: Reencrypt the secrets
3+
# HACK: For now we set the old SHA1 algorithm
4+
5+
ActiveSupport::KeyGenerator.hash_digest_class = OpenSSL::Digest::SHA1
6+
Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA256
7+
Rails.application.config.active_record.encryption.support_sha1_for_non_deterministic_encryption = true

0 commit comments

Comments
 (0)