Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
common
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
曲欣亮
common
Commits
6b24f32a
Commit
6b24f32a
authored
Aug 17, 2021
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
890af5fa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
MD5Util.java
src/main/java/com/egolm/common/MD5Util.java
+7
-0
No files found.
src/main/java/com/egolm/common/MD5Util.java
View file @
6b24f32a
...
@@ -6,11 +6,17 @@ package com.egolm.common;
...
@@ -6,11 +6,17 @@ package com.egolm.common;
import
java.security.MessageDigest
;
import
java.security.MessageDigest
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.Map.Entry
;
import
java.util.Map.Entry
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.SortedMap
;
import
java.util.SortedMap
;
import
java.util.TreeMap
;
import
java.util.TreeMap
;
public
class
MD5Util
{
public
class
MD5Util
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
MD5Util
.
class
);
/**
/**
* 签名算法sign
* 签名算法sign
* @param characterEncoding
* @param characterEncoding
...
@@ -31,6 +37,7 @@ public class MD5Util {
...
@@ -31,6 +37,7 @@ public class MD5Util {
}
}
sb
.
deleteCharAt
(
sb
.
length
()-
1
);
sb
.
deleteCharAt
(
sb
.
length
()-
1
);
System
.
out
.
println
(
"签名的字符串:"
+
sb
.
toString
());
System
.
out
.
println
(
"签名的字符串:"
+
sb
.
toString
());
logger
.
info
(
"签名的字符串: {}"
,
sb
.
toString
());
String
sign
=
MD5Encode
(
sb
.
toString
(),
characterEncoding
).
toUpperCase
();
String
sign
=
MD5Encode
(
sb
.
toString
(),
characterEncoding
).
toUpperCase
();
return
sign
;
return
sign
;
}
}
...
...
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