PHP OpenSSL 工具包
This commit is contained in:
parent
c5e7c84dea
commit
068bb79363
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "chenc/php-openssl-cryptor",
|
"name": "aix/php-openssl-cryptor",
|
||||||
"description": "creating/encrypting/decrypting for php open_ssl library",
|
"description": "creating/encrypting/decrypting for php open_ssl library",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -11,7 +11,7 @@
|
|||||||
],
|
],
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Chenc\\PhpOpensslCryptor\\": "src/"
|
"Aix\\PhpOpensslCryptor\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Chenc\PhpOpensslCryptor;
|
namespace Aix\PhpOpensslCryptor;
|
||||||
|
|
||||||
class Cryptor
|
class Cryptor
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Chenc\PhpOpensslCryptor;
|
namespace Aix\PhpOpensslCryptor;
|
||||||
/**
|
/**
|
||||||
* Sm4加密解密类
|
* Sm4加密解密类
|
||||||
* Class Sm4Helper
|
* Class Sm4Helper
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once 'vendor/autoload.php';
|
require_once 'vendor/autoload.php';
|
||||||
|
|
||||||
use Chenc\PhpOpensslCryptor\Cryptor;
|
use Aix\PhpOpensslCryptor\Cryptor;
|
||||||
$x = new Cryptor('aes-256-ctr','sha256',Cryptor::FORMAT_B64);
|
$x = new Cryptor('aes-256-ctr','sha256',Cryptor::FORMAT_B64);
|
||||||
//$x->createCert('123456',true);
|
//$x->createCert('123456',true);
|
||||||
var_dump($x->encryptString('123456','0987654321'));
|
var_dump($x->encryptString('123456','0987654321'));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user