java 这个签名算法求问大神怎么用node实现
发布于 8 年前 作者 owen-hong 3851 次预览 最后一次回复是 8 年前 来自 问答
public static String getKeyedDigest(String strSrc, String key) {
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(strSrc.getBytes(Common.CHARSET));
String result="";
byte[] temp;
temp=md5.digest(key.getBytes(Common.CHARSET));
for (int i=0; i<temp.length; i++){
result+=Integer.toHexString((0x000000ff & temp[i]) | 0xffffff00).substring(6);
}
return result;
}
3 回复
不要问怎么用node实现, 自己google就能找到node crypto
md5??
node crypto