Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
property-management
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
property-management
Commits
324fc0f9
Commit
324fc0f9
authored
Jul 09, 2019
by
zhangdaihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JeecgBoot 2.0.2 版本发布
parent
ad2fe4a2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
jeecg-boot/jeecg-boot-base-common/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java
+2
-3
No files found.
jeecg-boot/jeecg-boot-base-common/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java
View file @
324fc0f9
...
@@ -13,7 +13,6 @@ public class AesEncryptUtil {
...
@@ -13,7 +13,6 @@ public class AesEncryptUtil {
//使用AES-128-CBC加密模式,key需要为16位,key和iv可以相同!
//使用AES-128-CBC加密模式,key需要为16位,key和iv可以相同!
private
static
String
KEY
=
EncryptedString
.
key
;
private
static
String
KEY
=
EncryptedString
.
key
;
private
static
String
IV
=
EncryptedString
.
iv
;
private
static
String
IV
=
EncryptedString
.
iv
;
/**
/**
...
@@ -45,7 +44,7 @@ public class AesEncryptUtil {
...
@@ -45,7 +44,7 @@ public class AesEncryptUtil {
cipher
.
init
(
Cipher
.
ENCRYPT_MODE
,
keyspec
,
ivspec
);
cipher
.
init
(
Cipher
.
ENCRYPT_MODE
,
keyspec
,
ivspec
);
byte
[]
encrypted
=
cipher
.
doFinal
(
plaintext
);
byte
[]
encrypted
=
cipher
.
doFinal
(
plaintext
);
return
new
Base64
()
.
encodeToString
(
encrypted
);
return
Base64
.
encodeToString
(
encrypted
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -63,7 +62,7 @@ public class AesEncryptUtil {
...
@@ -63,7 +62,7 @@ public class AesEncryptUtil {
*/
*/
public
static
String
desEncrypt
(
String
data
,
String
key
,
String
iv
)
throws
Exception
{
public
static
String
desEncrypt
(
String
data
,
String
key
,
String
iv
)
throws
Exception
{
try
{
try
{
byte
[]
encrypted1
=
new
Base64
()
.
decode
(
data
);
byte
[]
encrypted1
=
Base64
.
decode
(
data
);
Cipher
cipher
=
Cipher
.
getInstance
(
"AES/CBC/NoPadding"
);
Cipher
cipher
=
Cipher
.
getInstance
(
"AES/CBC/NoPadding"
);
SecretKeySpec
keyspec
=
new
SecretKeySpec
(
key
.
getBytes
(),
"AES"
);
SecretKeySpec
keyspec
=
new
SecretKeySpec
(
key
.
getBytes
(),
"AES"
);
...
...
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