\PhalApi_Crypt_MultiMcrypt

PhalApi_Crypt_MultiMcrypt 多级mcrypt加密 对底层的mcrypt进行简单的再封装,以便存储和保留类型

  • 依赖PhalApi_Crypt_Mcrypt进行加解密操作
  • 支持任何数据类型的加解密
  • 返回便于存储的字符串

Summary

Methods
Properties
Constants
__construct()
encrypt()
decrypt()
No public properties found
No constants found
No protected methods found
$mcrypt
N/A
No private methods found
No private properties found
N/A

Properties

Methods

__construct()

__construct(  $iv) 

Parameters

$iv

encrypt()

encrypt(mixed  $data, string  $key) : mixed

Encrypt data with key

Parameters

mixed $data

待加密的数据

string $key

encrypt key

Returns

mixed —

encrypted data

decrypt()

decrypt(mixed  $data, string  $key) : mixed

忽略不能正常反序列化的操作,并且在不能预期解密的情况下返回原文

Parameters

mixed $data

encrypted data

string $key

encrypt key

Returns

mixed —

data after decrypt