Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
sentinel
Commits
36eb86e7
Commit
36eb86e7
authored
Aug 29, 2018
by
曲欣亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改签名算法
parent
ae3fc6c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
SigUtil.java
src/main/java/com/egolm/lang/config/interceptor/SigUtil.java
+12
-2
No files found.
src/main/java/com/egolm/lang/config/interceptor/SigUtil.java
View file @
36eb86e7
package
com
.
egolm
.
lang
.
config
.
interceptor
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.TreeMap
;
...
...
@@ -12,8 +13,17 @@ public class SigUtil {
Map
<
Object
,
Object
>
parameterMap
=
new
TreeMap
<
Object
,
Object
>(
parameters
);
parameterMap
.
remove
(
"sig"
);
String
queryString
=
HttpUtil
.
formatToQueryString
(
parameterMap
);
String
vsig
=
StringUtil
.
toMD5HexString
(
queryString
);
String
vsig
=
StringUtil
.
toMD5HexString
(
queryString
+
secret
);
return
vsig
;
}
public
static
void
main
(
String
[]
args
)
{
String
appid
=
"44EB5B79174D45F48BF32C09E6F0C4AA"
;
String
secret
=
"4117B10F6D48494595EE5D567333BB32"
;
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"appid"
,
appid
);
map
.
put
(
"sDocument"
,
"请刷银行卡"
);
map
.
put
(
"sLink"
,
"APOS/BankCardForm"
);
String
sig
=
sig
(
map
,
secret
);
System
.
out
.
println
(
sig
);
}
}
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