Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Eloquentencryption Laravel Package

richardstyles/eloquentencryption

View on GitHub
Deep Wiki
Context7
v4.0.0

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: https://github.com/RichardStyles/EloquentEncryption/compare/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

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() 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
  • Add EncryptedBoolean cast by @valorin #3
v1.4
  • Add optional support to define a class that implements RsaKeyHandler to store, retrieved generated RSA keys from somewhere else.
v1.3

Fixes configuration setup error.

v1.2

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!

v1.1.1

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

v1.1

This release updates to use the Grammar::macro() to define the additional grammar helpers, avoiding possible collisions with similar packages.

v1.0

Public release for Eloquent Encryption

0.1

Initial release

  • Adds encrypted field type to migrations blueprints.
  • Adds encrypt:generate command to create RSA keys.
  • Adds Encrypted cast to encode/decode the fields which have been set on a model.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed