Skip to content

Releases: RichardStyles/EloquentEncryption

Laravel 12

24 Feb 20:21
9a8af23

Choose a tag to compare

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

04 Jun 21:52
349b24d

Choose a tag to compare

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

27 Oct 07:28

Choose a tag to compare

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

12 Nov 22:44

Choose a tag to compare

  • 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

01 Nov 20:55

Choose a tag to compare

Standardise to Laravel contract

  • EloquentEncryption now uses Illuminate\Contracts\Encryption\Encrypter contract.

Possible breaking changes:

  • If relying on 1.x use new encryptString() or decryptString() 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

01 Nov 20:46

Choose a tag to compare

Optional Key storage

30 Oct 20:52

Choose a tag to compare

  • Add optional support to define a class that implements RsaKeyHandler to store, retrieved generated RSA keys from somewhere else.

Eloquent Encryption

30 Oct 14:20
a6e618e

Choose a tag to compare

Fixes configuration setup error.

Additional Encryption Casts

27 Oct 20:49

Choose a tag to compare

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

27 Oct 13:14

Choose a tag to compare

Update README.md for installation/usage process now grammar helpers are including using macros.