php 非对称加密解密签名验签 类

时间:2021-07-29 16:00:33
【文件属性】:
文件名称:php 非对称加密解密签名验签 类
文件大小:6KB
文件格式:PHP
更新时间:2021-07-29 16:00:33
加密 解密 签名 验签 几行代码就搞定 php 非对称加密解密签名验签 $stime=microtime(true); #获取程序开始执行的时间 $ps=newRsa(); $str='我是谁,我在哪'; $crypt=$ps->privateEncrypt($str); echo $ps->publicDecrypt($crypt); $sign=$ps->sign('234234'); echo "
sign{$sign}
"; $verify=$ps->verify('234234',$sign); echo "
verify {$verify}
"; #你写的php代码 $etime=microtime(true); #获取程序执行结束的时间 $total=$etime-$stime; #计算差值 echo "
{$total} times
";

网友评论