Commit 592105aa by zhoupeng

初始化请求头

parent 9c33ad6a
......@@ -67,6 +67,23 @@ public class HmacSHA256Util {
}
/**
* 获取请求头sign
* @return
*/
public static String getSign(String timestamp){
try {
String enterpriseId = "0";
String str = HmacSHA256Util.hmacSHA256(enterpriseId, timestamp);
String encodeStr = Base64.encodeBase64String(str.getBytes());
return encodeStr;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static void main(String[] args) {
String enterpriseId = "10000001";
String timestamp = DateUtils.convert(new Date(), DateUtils.YYYYMMDDHHMMSS);
......
......@@ -157,3 +157,7 @@ tsa:
product_catalog_id: 743532
# 腾讯广告服务地址
remote_address: https://api.e.qq.com/v1.1/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment