org.apache.commons.codec.digest.DigestUtils
DigestUtils.md5Hex() 对应php md5() 32位
DigestUtils.md5Hex().substring(8, 24) 对应php md5() 64位
DigestUtils.sha1Hex() 对应php sha1() 默认位数
Base64.getEncoder().encodeToString() 对应php base64_encode加密算法
相同字符串加密后java 和 php 得出结果一致
JAVA实现PHP中的md5函数sha1函数base64_encode算法
猜你喜欢
转载自blog.csdn.net/ysl_20190905/article/details/103076049
今日推荐
周排行