文件名称:php AES/ECB加密解密
文件大小:443B
文件格式:TXT
更新时间:2024-02-04 15:18:41
AESECB 加密解密
$key = "WANGBAOCHEN9@wHhs0000000000000000"; $data = '{"Place":"车间1","Weight":68.98}'; //转换为GB2312 $data = iconv('UTF-8','GB2312',$data); //加密 $data=mcrypt_encrypt(MCRYPT_RIJNDAEL_128,$key, $data, 'ecb'); //转HEX $data = strtoupper(bin2hex($data)); //解密 //转string $data = hex2bin(strtolower($data))