Aes
class Aes
基于 openssl 扩展的 AES 加解密
支持 AES-256-CBC, AES-192-CBC, AES-128-CBC 兼容 openssl 命令行
Methods
__construct($keySize = 256)
No description
setKeySize($keySize)
No description
string
encrypt(string $data, string $secret)
Encrypt the string data, using the password secret.
string
decrypt(string $data, string $secret)
Decrypt the string data, using the password secret.
getOpenSslName()
No description
getAesName()
No description
requiresPadding()
No description
Details
at line 21
__construct($keySize = 256)
at line 26
setKeySize($keySize)
at line 45
string
encrypt(string $data, string $secret)
Encrypt the string data, using the password secret.
echo -n | openssl aes-256-cbc -md md5 -base64 -pass pass:
at line 69
string
decrypt(string $data, string $secret)
Decrypt the string data, using the password secret.
echo | openssl aes-256-cbc -md md5 -d -base64 -pass pass: