Looking to hire Laravel developers? Try LaraJobs

laravel-crypto maintained by akira

Description
This is my package laravel-crypto
Author
Last update
2026/05/08 23:37 (1.x-dev)
License
Downloads
1 064

Comments
comments powered by Disqus

img.png

Laravel Crypto is a Laravel package designed to make encryption and decryption straightforward. It supports:

  • Secure encryption using modern algorithms such as AES-256-CBC.
  • Customizable configuration, allowing you to define key sizes, algorithms, iterations, and more.
  • Effortless integration with Laravel's configuration and service container.
  • Randomized Initialization Vectors (IVs) for enhanced encryption security.

Whether you're building an application that requires secure data storage, transmitting sensitive information, or complying with data protection regulations, Laravel Crypto has you covered.

Quick Start

Installation

composer require akira/laravel-crypto

Generate Key

php artisan crypto:generate-key

Add to your .env:

CRYPTO_ENCRYPTION_KEY=your-generated-key-here

Usage

// Using helper function (recommended - has IDE autocomplete ⭐)
$encrypted = crypto()->encrypt('Hello World');
$decrypted = crypto()->decrypt($encrypted);

// Or using facade
use Akira\LaravelCrypto\Facades\Crypto;
$encrypted = Crypto::encrypt('Hello World');
$decrypted = Crypto::decrypt($encrypted);

Documentation

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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