deemru / cryptash
基于哈希的加密/解密
1.0.3
2023-06-26 15:51 UTC
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2024-09-26 20:14:44 UTC
README
Cryptash实现了基于哈希的加密,具有用户定义的IV和MAC大小。
这是一种保护并验证外部数据传输的简单方法。
用法
$cryptash = new Cryptash( 'Password' ); $msg = 'Hello, world!'; $encrypted = $cryptash->encryptash( $msg ); $decrypted = $cryptash->decryptash( $encrypted ); if( $decrypted !== $msg ) exit( 1 );
要求
- PHP >=5.4
安装
通过Composer要求
{ "require": { "deemru/cryptash": "1.0.*" } }