Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
cash-loan-flow-boss
Commits
1023341a
Commit
1023341a
authored
Jul 09, 2020
by
王向伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加解密演示示例
parent
9b3bcdfd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
EncryptController.java
...group/cashloanflowboss/api/encrypt/EncryptController.java
+6
-2
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/encrypt/EncryptController.java
View file @
1023341a
...
@@ -5,6 +5,8 @@ import cn.quantgroup.cashloanflowboss.utils.AesUtil;
...
@@ -5,6 +5,8 @@ import cn.quantgroup.cashloanflowboss.utils.AesUtil;
import
cn.quantgroup.cashloanflowboss.utils.Md5Util
;
import
cn.quantgroup.cashloanflowboss.utils.Md5Util
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
/**
/**
...
@@ -29,11 +31,13 @@ public class EncryptController {
...
@@ -29,11 +31,13 @@ public class EncryptController {
return
Result
.
buildSuccess
(
result
);
return
Result
.
buildSuccess
(
result
);
}
}
@
GetMapping
(
"
decrypt"
)
@
PostMapping
(
"/
decrypt"
)
public
Result
<
StandardResponse
>
decrypt
(
String
responseStr
){
public
Result
<
StandardResponse
>
decrypt
(
@RequestParam
String
responseStr
){
String
result
=
AesUtil
.
decryptAfterBase64Decode
(
responseStr
,
aesKey
);
String
result
=
AesUtil
.
decryptAfterBase64Decode
(
responseStr
,
aesKey
);
StandardResponse
response
=
(
new
Gson
()).
fromJson
(
result
,
StandardResponse
.
class
);
StandardResponse
response
=
(
new
Gson
()).
fromJson
(
result
,
StandardResponse
.
class
);
return
Result
.
buildSuccess
(
response
);
return
Result
.
buildSuccess
(
response
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment