mblsolutions/mcryptgatewayservice
最新稳定版本:v1.2.0
Composer 安装命令:
composer require mblsolutions/mcryptgatewayservice
包简介
Package to allow interaction to MBL Solutions Mcrypt Gateway
README 文档
README
Package to interact with the MBL Solutions Mcrypt Gateway Service.
Allows versions of PHP that do not support mcrypt_encrypt and mcrypt_decrypt to handle Mcrypt encryption and decryption.
Installation with Composer
composer require mblsolutions/mcryptgatewayservice
Usage
Data passed in should be base64 encoded
Encryption
$mcryptService = new MBLSolutions\McryptService('https://example.execute-api.eu-west-1.amazonaws.com', 'prod'); $string = base64_encode('password'); // Encrypted base64 encoded string `password` $secret = base64_encode('thisisatwentyfourcharkey'); // encryption secret $result = $mcryptService->encrypt($string, $secret); // Encrypts into 0sQg7vz6S9g=
Decryption
$mcryptService = new MBLSolutions\McryptService('https://example.execute-api.eu-west-1.amazonaws.com', 'prod'); $encrypted = '0sQg7vz6S9g='; // Encrypted base64 encoded string `password` $secret = base64_encode('thisisatwentyfourcharkey'); // encryption secret $result = $mcryptService->decrypt($encrypted, $secret); // Decrypts into cGFzc3dvcmQ= base64_decode($result); // password
统计信息
- 总下载量: 4.21k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-11