The guides explain a change in 7.0, from hashing with SHA1 to SHA256:
This does not appear to work: when creating a KeyGenerator in config/initializers, it does still use SHA1. Only later at runtime, when again creating a KeyGenerator, it does use SHA256. Obviousely those are not interoperable, and things do not work.
A specific usecase is devise Gem; at startup it creates KeyGenerator with SHA1.
As a workaround for now, I do issue this command in config/initializers:
ActiveSupport::KeyGenerator.hash_digest_class =
Rails.application.config.active_support.key_generator_hash_digest_class
With that, my things do work again.
I am currently using version 7.0.1 - this is not the newest, but I didn’t see a notion in change log that it would have been fixed in the meantime.