|
@@ -37,15 +37,20 @@ public class TempServiceTests {
|
|
|
|
|
|
@Test
|
|
|
public void testUpdate() {
|
|
|
+ //应用标识,为固定值,直接使用即可
|
|
|
String appKey = "4e95e3d926a2a4befa5d913acc0aa9f5";
|
|
|
EncryptionLoginDTO encryptionLoginDTO = new EncryptionLoginDTO();
|
|
|
encryptionLoginDTO.setAppKey(appKey);
|
|
|
+ //登录账号
|
|
|
encryptionLoginDTO.setUsername("admin");
|
|
|
+ //登录密码
|
|
|
encryptionLoginDTO.setPassword("xiaoshi221101");
|
|
|
+ //本机器的机器码,此处为伪造
|
|
|
encryptionLoginDTO.setMachineCode("BDACEARQ1241241");
|
|
|
long currentTimeMillis = System.currentTimeMillis();
|
|
|
encryptionLoginDTO.setCurrentTimeMillis(currentTimeMillis);
|
|
|
String appSecret = appKey + currentTimeMillis / 1000;
|
|
|
+ //md5加密标识
|
|
|
String md5Sign = SecureUtil.md5(appSecret);
|
|
|
encryptionLoginDTO.setSign(md5Sign);
|
|
|
try {
|