用户变量上传
获取认证码
public String authToken(String projectKeyId, String secretKey, String keyArray) throws Exception {
String message = "ai="+projectKeyId+"&cs="+keyArray;
Mac hmac = Mac.getInstance("HmacSHA256");
hmac.init(new SecretKeySpec(secretKey.getBytes("UTF-8"), "HmacSHA256"));
byte[] signature = hmac.doFinal(message.getBytes("UTF-8"));
return Hex.encodeHexString(signature);
}接口定义
URL
请求类型
参数说明
Last updated
Was this helpful?