java版MD5转换成php版
程序员文章站
2022-05-19 14:34:56
...
java代码
public static String encryptMD5_Salt(String content) { String resultString = ""; String appkey = "acdf,kef"; byte[] a = appkey.getBytes(); byte[] datSource = content.getBytes(); byte[] b = new byte[a.length + 4 + datSource.length]; int i; for (i = 0; iphp代码:
function javaMd5($data) { assert(is_array($data)); $dataString = byteArrayToString($data); $hashString = md5($dataString); return $hashString; } function byteArrayToString($b) { assert(is_array($b)); $asciiString = ''; for ($i = 0; $i