Download the PHP package swisnl/laravel-encrypted-data without Composer
On this page you can find all versions of the php package swisnl/laravel-encrypted-data. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download swisnl/laravel-encrypted-data
More information about swisnl/laravel-encrypted-data
Files in swisnl/laravel-encrypted-data
Package laravel-encrypted-data
Short Description Laravel Utilities for Encrypted Data
License MIT
Homepage https://github.com/swisnl/laravel-encrypted-data
Informations about the package laravel-encrypted-data
Laravel Utilities for Encrypted Data
This package contains several Laravel utilities to work with encrypted data.
Install
Via Composer
N.B. Using Laravel 6-8? Please use version 1.x of this package.
Usage
Models
[!WARNING] Laravel supports encrypted casts since version 8.12, so new projects should use that instead of the models provided by this package.
We aim to provide a migration path to encrypted casts. See issue #1 for more information.
Extend \Swis\Laravel\Encrypted\EncryptedModel
in your model and define the encrypted fields. Make sure your database columns are long enough, so your data isn't truncated!
You can now simply use the model properties as usual and everything will be encrypted/decrypted under the hood!
Filesystem
Configure the storage driver in config/filesystems.php
.
You can now simply use the storage methods as usual and everything will be encrypted/decrypted under the hood!
Known issues/limitations
Due to the encryption, some issues/limitations apply:
- Encrypted data is — depending on what you encrypt — roughly 30-40% bigger.
Models
- You can't query or order columns that are encrypted in your SQL-statements, but you can query or sort the results using collection methods;
- All data is being serialized before it is encrypted — and unserialized after it is decrypted — so everything is stored exactly as how Laravel would insert it into the database. You can use Eloquent Mutators as you normally would.
Filesystem
- You can't use the public disk as that will download the raw encrypted files, so using
Storage::url()
andStorage::temporaryUrl()
does not make sense; - You can use streams with this disk, but internally we will always convert those to strings because the entire file contents need to be encrypted/decrypted at once.
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Jasper Zonneveld
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
SWIS :heart: Open Source
SWIS is a web agency from Leiden, the Netherlands. We love working with open source software.
All versions of laravel-encrypted-data with dependencies
laravel/framework Version ^9.0|^10.0|^11.0
swisnl/flysystem-encrypted Version ^2.0