All notable changes to eloquentencryption will be documented in this file
- As of Laravel 8.14 you can specify the built in Eloquent Encryption casting setting a model's encryptUsing 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',
];
}- EloquentEncryption now uses
Illuminate\Contracts\Encryption\Encryptercontract. - BC If relying on 1.x use
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.
- Add
EncryptedBooleancast by @valorin #3
- Add optional support to define
RsaKeyHandlerto store, retrieved generated RSA keys.
- bug fix
- Add additional Cast classes.
EncryptedIntegerEncryptedFloatEncryptedCollection
- Update README.md
- Refactor how blueprint helper's are included.
- initial release
- Adds
encryptedfield type to migrations blueprints. - Adds
encrypt:generatecommand to create RSA keys. - Adds
Encryptedcast to encode/decode the fields which have been set on a model.