哪位大哥帮忙翻译成PHP?

哪位大哥帮忙翻译成PHP? JAVA不懂, 对方没有PHP SDK 谢谢了.

/** * 签名算法 * * @return * @throws Exception */ public static String createSignString param throws Exception { StringBuffer result = new StringBuffer; MessageDigest md5 = MessageDigest.getInstance"MD5"; md5.updateparam.getBytes"UTF-8"; byte[] b = md5.digest; forint i=0;i< b.length;++i { int x = b[i]&0xFF; int h = x>>>4; int l = x&0x0F; result.appendcharh+h<10?0:a-10; result.appendcharl+l<10?0:a-10; } return result.toString.substring8, 24; }

function create_sign$src{ return substrmd5$src, 8, 16;
}

发表评论

电子邮件地址不会被公开。 必填项已用*标注