定制 lablnet/encryption 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lablnet/encryption

最新稳定版本:1.2

Composer 安装命令:

composer require lablnet/encryption

包简介

PHP Encryption package.

README 文档

README

Build Status StyleCI

PHP Encryption

Encryption in PHP.

Requirement

  1. PHP 7 (7.3 Recommanded).
  2. Composer.
  3. openSSL php extension.
  4. Sodium php extension for use sodium adapter.

Insallation

Installing this package is very simple, first ensure you have the right PHP version and composer installed then in your terminal/(command prompt) run: composer require lablnet/encryption

Encrypt

You can encrypt string by calling to encrypt method

<?php 
use Lablnet\Encryption;
require '../vendor/autoload.php';

$encryption = new Encryption('your-key');

//Encrypt the message
$encrypt = $encryption->encrypt("This is a text");

echo $encrypt;

Decrypt

You can decrypt token by calling decrypt method

<?php 
use Lablnet\Encryption;
require '../vendor/autoload.php';

$encryption = new Encryption('your-key');

//Decrypt the message
$decrypt = $encryption->decrypt($encrypt);	
echo $decrypt;

Adapter

This Package support two encryption adapter

  • OpenSSL
  • Sodium

Default openSSL will use, you can use any one you want.

change Adapter

You can pass supported adapter to class like

Use of sodium

<?php 
use Lablnet\Encryption;
require '../vendor/autoload.php';

$encryption = new Encryption('your-key','sodium');

Use of openSSL

<?php 
use Lablnet\Encryption;
require '../vendor/autoload.php';

$encryption = new Encryption('your-key','openssl');

Contributions

There is still a lot of work to do, so feel free to contribute to open PR

License

MIT

Support

Donate coffee?
here is the bitcoin address
Balance

37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV

Thanks you so much.

Disclaimer

I don't Accept any responsibility for any illegal usage

统计信息

  • 总下载量: 3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 2
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固