Download the PHP package codelieutenant/laravel-crypto without Composer

On this page you can find all versions of the php package codelieutenant/laravel-crypto. 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-crypto

Laravel Crypto

Run Tests GitHub issues GitHub stars GitHub license

What's Laravel Crypto and why should I use it?

Laravel Crypto is a library that provides easy to use API for most common cryptographic functions. It is designed to be easy to use and secure. It uses the best and most secure algorithms available today.

Laravel's default encryption is secure, but it is slow. Laravel Crypto provides faster and more secure algorithms for encryption and hashing. It's drop in replacement for Laravel's EncryptionServiceProvider and it uses libsodium under the hood. As long as you use default laravel encryption, you don't need to change anything in your code.

Getting started

Installing

Publishing config file

Replacing Laravel's EncryptionServiceProvider with LaravelCrypto's ServiceProvider

In order to activate this package, you need to replace Laravel's EncryptionServiceProvider with LaravelCryptoServiceProvider.

In config/app.php replace Illuminate\Encryption\EncryptionServiceProvider::class with CodeLieutenant\LaravelCrypto\ServiceProvider::class Depending on the laravel version you are using, you can do it in two ways.

Laravel 9.0 and above:

Laravel 8.0:

Configuration

In order to use Laravel Crypto, you need to change cipher in the config/app.php file. Possible values:

Unique to Laravel Crypto:

Coming from Laravel Encryption (supported as LaravelCrypto falls back to EncryptionServiceProvider implementation):

Generating Keys

For encryption Laravel command php artisan key:generate is good and can be used, but since this package can be used for hashing and signing the data, command for generating keys is provided.

It generates backwards compatible keys for laravel cipher configuration and keys for Sodium algorithms. There are multiple option for this command, you can check them by running php artisan crypto:keys --help, so this command can be used as a drop in replacement for key:generate.

Using in existing laravel project

This package does not provide backward compatibility with Laravel's default encryption (if configuration is changed). If you want to use Laravel Crypto in an existing project, you need to re-encrypt all your data.


All versions of laravel-crypto with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-sodium Version *
illuminate/collections Version ^8|^9|^10|^11
illuminate/config Version ^8|^9|^10|^11
illuminate/contracts Version ^8|^9|^10|^11
illuminate/encryption Version ^8|^9|^10|^11
illuminate/hashing Version ^8|^9|^10|^11
illuminate/support Version ^8|^9|^10|^11
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 codelieutenant/laravel-crypto contains the following files

Loading the files please wait ....