Download the PHP package bjornvoesten/laravel-ciphersweet without Composer

On this page you can find all versions of the php package bjornvoesten/laravel-ciphersweet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-ciphersweet

This repository has been deprecated in favor of: https://github.com/bjornvoesten/ciphersweet-for-laravel


Laravel CipherSweet: Searchable Encrypted Attributes

Hey! I have to say that I'm not very active maintaining this package, but you may always send pull requests!

Laravel CipherSweet is a Laravel implementation of Paragon Initiative Enterprises CipherSweet searchable field level encryption.

Preview

Make sure you have some basic understanding of CipherSweet before continuing.

Installation

Install the package using composer:

Publish configuration file:

Generate an encryption key:

Watch out! All encrypted columns depend on this key. If the key changes, the already encrypted columns can not be decrypted anymore!

Configuration

Algorithm

You can change the encryption algorithm by defining the crypto:

For more information about the encryption index algorithms see the documentation.

Usage

Defining encryption

Add the Bjornvoesten\CipherSweet\Traits\HasEncryption trait to the model.

Define the attributes that should ben encrypted.

By default the index column name is generated using the name and suffixing it with _index.

So the social_security_number attribute will use the default index column social_security_number_index.

Alternatively you can define multiple indexes per attribute and and define more options.

For more information about the index options see the documentation.

And make sure you have created the index columns in the database table!

Searching models

You can search encrypted attributes by using the default where clause on the query builder or with the whereEncrypted method.

By using the whereEncrypted method you can also define the indexes which can be searched.

Note When searching with the equal to operator models will be returned when the value is found in one of all available or defined indexes. When searching with the not equal to operator all models where the value is not found in any of the available or the defined indexes are returned.

Caveat

Because of the limited search possibilities in CipherSweet only the = and != operators are available when searching encrypted attributes.

Testing

To be done.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-ciphersweet with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
illuminate/database Version ^7.0|^8.0|^9.0|^10.0
paragonie/ciphersweet Version ^4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bjornvoesten/laravel-ciphersweet contains the following files

Loading the files please wait ....