Rotate SALT_KEY
mainYou can rotate salt keys by providing a list to the SALT_KEY setting instead of a single string.
- The first key in the list is used for all new encryption operations.
- Decryption attempts will use all keys in the list, in order, until a match is found.
This allows you to introduce a new key at the head of the list while maintaining access to data encrypted with older keys.
SALT_KEY = [
'zyxwvutsrqponmlkjihgfedcba9876543210', # New key for new data
'0123456789abcdefghijklmnopqrstuvwxyz' # Old key for existing data
]