Repository navigation
v2.5.0
Added (opt-in)
EncryptedCast(keyring: ...)with theEncryptionKeyringcontract turns on a new ciphertext format,v2:<key id>:…(XChaCha20-Poly1305-IETF):- the key ID is stored in the value, so keys rotate without downtime;
- the value is bound to its class and field (or to
context:), so a ciphertext copied into another field is rejected; - the plaintext is padded to 32-byte blocks, hiding card-number length;
- keys must be 32 random bytes, raw or base64.
- With a legacy key next to the keyring, both formats are read and only the new one is written.
EncryptedCast::needsReencryption()andforField()for rotation and migration scripts.Support\BlindIndex: a keyed HMAC-SHA256 to search encrypted columns.Contracts\BindsToField: casts implementing it learn their class and field when metadata is built.
Fully backward compatible with 2.4.x: without keyring: the cast and its ciphertext format are unchanged.