tzsk/crypt

This package is abandoned and no longer maintained. The author suggests using the tzsk/crypton package instead.

Cross Platform Encryption And Decryption

1.0.1 2017-08-16 10:57 UTC

This package is auto-updated.

Last update: 2020-09-22 17:16:50 UTC


README

Latest Version on Packagist Software License Build Status StyleCI Quality Score Total Downloads

Cross Platform Encryption and Decryption with Laravel. Mostly used for API Response Encryption and Decrypt at app Level.

Compatible with Laravel 5.1 or Higher.

Install

Via Composer

$ composer require tzsk/crypt

Configure

config/app.php

'providers' => [
    ...
    Tzsk\Crypt\Provider\CryptServiceProvider::class,
    ...
],

'aliases' => [
    ...
    'StrCrypt' => Tzsk\Crypt\Facade\StrCrypt::class,
    ...
],

To publish the Configuration file in config/crypt.php Run:

php artisan vendor:publish --tag=config

Usage

First use the namespace at the top:

use Tzsk\Crypt\Facade\StrCrypt;

Then use it as following:

$text = "Hello World!";

$encrypted = StrCrypt::encrypt($text);

$decrypted = StrCrypt::decrypt($encrypted);

Change log

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

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email mailtokmahmed@gmail.com instead of using the issue tracker.

Credits

License

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