1. 首页
  2. 行业
  3. 互联网
  4. php AES/ECB加密解密

php AES/ECB加密解密

上传者: 2021-01-15 13:17:44上传 TXT文件 443B 热度 19次
$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))
用户评论