微信后端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB

package com.ynxbd.common;
import com.ynxbd.common.helper.common.HMACHelper;
public class TestA {
// public static void main(String[] args) throws Exception {
// // System.out.println(AesWxHelper.decode(""));
// }
// public static void main(String[] args) {
// String KEY = "3431de05cbf9d0ffdbc064a352835981";
// String PARTNER_ID = "100000637";
//
// String timestamp = System.currentTimeMillis() + "";
// String str = PARTNER_ID + timestamp;
// String cacheSign = HMACHelper.sha256(str, KEY);
// System.out.println(timestamp);
// System.out.println(cacheSign);
// }
public static void main(String[] args) {
String KEY = "795b207e12572839976d9310bdde32be";
String PARTNER_ID = "100000317";
String timestamp = System.currentTimeMillis() + "";
String str = PARTNER_ID + timestamp;
String cacheSign = HMACHelper.sha256(str, KEY);
System.out.println(timestamp);
System.out.println(cacheSign);
9 months ago
}
}