Authenticated encryption for the successor stored during refresh rotation.
The ciphertext format is provided by Plug.Crypto.MessageEncryptor and is
intentionally kept here with its existing AAD and derived keys. The
application secret is read when encrypting or decrypting so a key change
takes effect for both operations without changing the persisted wrapper.
Summary
Functions
Decrypts and safely decodes a refresh-token successor ciphertext.
Derives the encryption and signing keys from a refresh-successor secret.
Encrypts a successor term with the configured refresh-successor secret.
Functions
Decrypts and safely decodes a refresh-token successor ciphertext.
Authentication failures and missing or invalid configuration return
:error, matching the pre-consolidation call sites.
Derives the encryption and signing keys from a refresh-successor secret.
Kept public so the exact derivation has direct deterministic coverage.
Encrypts a successor term with the configured refresh-successor secret.
Returns :error when the secret is missing or too short. The caller owns
the persisted version wrapper around the returned ciphertext.