谁能帮我把这段JAVA语言改成php的, 或者告诉我是什么意思.非常感谢?

public static String getMacStr(VerifyRequest verifyRequest, String macKey){
 StringBuilder allInputAreaParams = new StringBuilder();
 allInputAreaParams.append(verifyRequest.getVersionId());
 allInputAreaParams.append(verifyRequest.getChrSet());
 String allInputAreaParamsStr = allInputAreaParams.toString();
 String md5SourceText = allInputAreaParamsStr + macKey;
 System.out.println(DigestUtils.md5Hex(md5SourceText));
 return DigestUtils.md5Hex(md5SourceText);
}
慕虎7371278
浏览 563回答 3
3回答

largeQ

就是把后面几个字符串拼接做md5加密。versionId, chrSet, macKey

紫衣仙女

class VerifyRequest{ private $versionId; private $chrSet; public function getVersionId(){ return $this->$versionId; } public function getChrSet(){ return $this->$chrSet; } } static function getMacStr($verifyRequest,$macKey){ $allInputAreaParams = $verifyRequest->getVersionId().$verifyRequest->getMacStr(); $md5SourceText = $allInputAreaParams.$macKey; return md5($md5SourceText); } 就是一个hash的算法而已
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java