Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webappauto
Overview
Overview
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
Li Yongyu
webappauto
Commits
52283ebe
Commit
52283ebe
authored
Sep 25, 2018
by
shuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除了加密算法
parent
6435f65a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
60 deletions
+0
-60
EncryptionUtil.java
Api_auto_test/src/com/offcn/TestUnti/EncryptionUtil.java
+0
-60
No files found.
Api_auto_test/src/com/offcn/TestUnti/EncryptionUtil.java
deleted
100644 → 0
View file @
6435f65a
package
com
.
offcn
.
TestUnti
;
import
com.puhui.aes.AesEncryptionUtil
;
import
org.apache.commons.lang3.StringUtils
;
/**
* 加密和解密
*
* @author wangcj
*/
public
class
EncryptionUtil
{
private
static
final
String
prefix
=
"xy"
;
private
EncryptionUtil
()
{
}
/**
* 加密
*
* @author wangcj
* @param content
* @return
*/
public
static
String
encrypt
(
String
content
)
{
String
tempContent
=
content
;
if
(
StringUtils
.
isBlank
(
tempContent
))
{
return
tempContent
;
}
if
(
tempContent
.
startsWith
(
prefix
))
{
return
tempContent
;
}
return
AesEncryptionUtil
.
encrypt
(
tempContent
);
}
/**
* 解密
*
* @author wangcj
* @param content
* @return
*/
public
static
String
decrypt
(
String
content
)
{
String
tempContent
=
content
;
if
(
StringUtils
.
isBlank
(
tempContent
))
{
return
tempContent
;
}
if
(
tempContent
.
startsWith
(
prefix
))
{
return
AesEncryptionUtil
.
decrypt
(
tempContent
);
}
return
tempContent
;
}
public
static
void
main
(
String
[]
args
)
{
String
s1
=
EncryptionUtil
.
encrypt
(
"18230065651"
);
String
s
=
EncryptionUtil
.
decrypt
(
"e10adc3949ba59abbe56e057f20f883e"
);
System
.
out
.
println
(
"加密后,卡号是:"
+
s1
);
System
.
out
.
println
(
"解密后,卡号是:"
+
s
);
}
}
\ No newline at end of file
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