md5 16位二进制与32位字符串相互转换示例_PHP教程
程序员文章站
2022-05-11 18:23:11
...
复制代码 代码如下:
$str = 'test';
$cm = md5($str);
$bm = md5($str, true);
$cstr = implode(unpack('H*', $bm));
$bstr = pack('H*', $cm);
echo 'str:'. $str . "
\n";
echo 'cm :' . $cm . "
\n";
echo 'cstr:' . $cstr . "
\n";
echo 'urlencode(bm) :' . urlencode($bm) . "
\n";
echo 'urlencode(bstr):' . urlencode($bstr) . "
\n";
下一篇: JSP的9种基本内置组件_MySQL