|
@@ -14,6 +14,7 @@ import com.fdkankan.manage.exception.BusinessException;
|
|
|
import com.fdkankan.manage.service.*;
|
|
|
import com.fdkankan.manage.thread.ThreadService;
|
|
|
import com.fdkankan.manage.util.ExcelUtil;
|
|
|
+import com.fdkankan.manage.util.RsaUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -23,6 +24,7 @@ import java.io.IOException;
|
|
|
import java.util.*;
|
|
|
|
|
|
import static com.amazonaws.util.CredentialUtils.getCredentialsProvider;
|
|
|
+import static com.fdkankan.manage.util.RsaUtils.getKeyPair;
|
|
|
|
|
|
@Slf4j
|
|
|
@RestController
|
|
@@ -52,6 +54,15 @@ public class TestController {
|
|
|
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
+ @RequestMapping("/createCameraAuthCode")
|
|
|
+ public ResultData createCameraAuthCode(@RequestParam(required = false) String snCode) throws Exception {
|
|
|
+ RsaUtils rsa = new RsaUtils();
|
|
|
+
|
|
|
+ String ciphertext = rsa.encipher("4DKKPRO_"+snCode, CacheUtil.publicKey);
|
|
|
+ System.out.println(String.format("密文:"+ciphertext));
|
|
|
+
|
|
|
+ return ResultData.ok(ciphertext);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 重置相机容量
|