Releases: RichardStyles/EloquentEncryption
Releases · RichardStyles/EloquentEncryption
v3.2
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\Encrypter
class/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\Encrypter
contract.
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
RsaKeyHandler
to 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.
Update grammar helpers
This release updates to use the Grammar::macro()
to define the additional grammar helpers, avoiding possible collisions with similar packages.