调用接口:https://solution.wps.cn/api/developer/v1/office/convert/to/png 接口调用后提示错误内容: {"code":30003,"message":"InvalidSignature","hint":"signature not match. expect: ba92703be9e26cc95a0da44068f43fdfe723a0b4, actual: 57848d780dbbba707fc1edaae18ae1c9130e9ecb","extra":""}
sh1加密前字段(已经脱敏):wpxxxxxxxxxxxxxxxx82d7154a0945bd9ee8755d668b57afc2application/jsonWed, 27 Sep 2023 08:03:41 GMT
md5数据的加密原始数据(已经脱敏):{"url":"http://xxxxx/file/admin/uploadDir/2023-09-26/xxxx.ppt","filename":"xxxx.ppt"}
Md5计算算法:
public static String getMd5(String value) throws NoSuchAlgorithmException {
System.out.println(value);
MessageDigest md = MessageDigest.getInstance("MD5");
// 计算消息的摘要
byte[] digest = md.digest(value.getBytes());
// 将摘要转换为十六进制字符串
String hexString = bytesToHex(digest);
System.out.println(hexString);
return hexString;
}
public static String bytesToHex(byte[] bytes) {
StringBuilder hexString = new StringBuilder();
for (byte b : bytes) {
String hex = Integer.toHexString(0xff & b);
if (hex.length() == 1) {
hexString.append('0');
}
hexString.append(hex);
}
return hexString.toString();
}
求助,具体哪个步骤配置错误,才造成加密数据不一致?