Commit 80d4cc18 by qwmqiuwenmin

Merge branch 'developer' of http://115.159.76.241/haoban3.0/haoban-manage3.0.git into developer

parents ab6c3841 f8b12ed0
import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.symmetric.AES;
import com.alibaba.fastjson.JSONObject;
import com.gic.haoban.manage.api.dto.SyncSingleDealDTO;
import com.gic.haoban.manage.api.service.DealSyncOperationApiService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Setest {
@Autowired
private DealSyncOperationApiService dealSyncOperationApiService;
@Test
public void test() {
Map<String,String> ret=new HashMap<>();
ret.put("test","test");
ret.put("name","name11");
AES aes = SecureUtil.aes("test111111111113".getBytes());
String code = aes.encryptHex(JSONObject.toJSONString(ret));
System.out.println(code);
String str = aes.decryptStr(code);
System.out.println(str);
}
}
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