PHP OpenSSL 工具包

This commit is contained in:
chenc 2023-05-16 16:59:21 +08:00
parent c5e7c84dea
commit 068bb79363
4 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
{
"name": "chenc/php-openssl-cryptor",
"name": "aix/php-openssl-cryptor",
"description": "creating/encrypting/decrypting for php open_ssl library",
"type": "library",
"license": "MIT",
@ -11,7 +11,7 @@
],
"autoload": {
"psr-4": {
"Chenc\\PhpOpensslCryptor\\": "src/"
"Aix\\PhpOpensslCryptor\\": "src/"
}
},
"require": {

View File

@ -1,6 +1,6 @@
<?php
namespace Chenc\PhpOpensslCryptor;
namespace Aix\PhpOpensslCryptor;
class Cryptor
{

View File

@ -1,6 +1,6 @@
<?php
namespace Chenc\PhpOpensslCryptor;
namespace Aix\PhpOpensslCryptor;
/**
* Sm4加密解密类
* Class Sm4Helper

View File

@ -1,7 +1,7 @@
<?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->createCert('123456',true);
var_dump($x->encryptString('123456','0987654321'));