Releases: RichardStyles/EloquentEncryption
Releases · RichardStyles/EloquentEncryption
Laravel 12
What's Changed
- Laravel 12 + 13 upgrade
- Phpseclib updated to v3
- Adds X25519 elliptic curve Diffie-Hellman (ECDH) key exchange alongside RSA.
- Adds key rotations
- Adds tests and phpstan to level 6
- Included storage handler refactored to allow for previous key-pair to allow for previous keys to migrate encrypted data.
Full Changelog: v3.2...v4.0.0
v3.2
Extends support for this package to be used on PHP 8.1 and Laravel 9.
Remember if you are upgrading - you do not need to regenerate existing keys.
v3.1.0
Extends support for this package to be used on PHP 8.0.
Remember if you are upgrading - you do not need to regenerate existing keys.
v3.0
- As of Laravel 8.14 you can specify the built-in Eloquent Encryption casting setting a model's encryptUsing function in your app service provider. This allows for automatic separation of your APP_KEY, when using a different
Illuminate\Contracts\Encryption\Encrypterclass/instance.
EncryptedCast::encryptUsing(new \RichardStyles\EloquentEncryption\EloquentEncryption);Then simply define your casts in your model as you normally would.
class EncryptedCast extends Model
{
public $casts = [
'secret' => 'encrypted',
'secret_array' => 'encrypted:array',
'secret_json' => 'encrypted:json',
'secret_object' => 'encrypted:object',
'secret_collection' => 'encrypted:collection',
];
}v2.0
Standardise to Laravel contract
- EloquentEncryption now uses
Illuminate\Contracts\Encryption\Encryptercontract.
Possible breaking changes:
- If relying on 1.x use new
encryptString()ordecryptString()functions if you are using this encryption elsewhere in your application. As the default encrypt/decrypt function now serialize values automatically, this may cause unexpected errors during decrypting. This follows Laravels convention when encrypting into AES-256-CBC.
v1.5
Optional Key storage
- Add optional support to define a class that implements
RsaKeyHandlerto store, retrieved generated RSA keys from somewhere else.
Eloquent Encryption
Fixes configuration setup error.
Additional Encryption Casts
This release includes additional Encrypted Casts which perform a secondary cast before/after encryption or decryption.
- EncryptedInteger - For Integers
- EncryptedFloat - For floats
- EncryptedCollection - For Collections as
Illuminate\Support\Collection
More cast types will be added in future, or sooner if you add a PR with tests!
Eloquent Encryption
Update README.md for installation/usage process now grammar helpers are including using macros.