Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
Project
Project
Details
Activity
Releases
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
zengtianlai3
ioc_sixiang_license
Commits
65490767
Commit
65490767
authored
Feb 02, 2023
by
ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改正身份证脱敏方法
parent
8951c836
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
CommonUtil.java
...se/src/main/java/iot/sixiang/license/util/CommonUtil.java
+3
-12
No files found.
license/src/main/java/iot/sixiang/license/util/CommonUtil.java
View file @
65490767
...
@@ -14,12 +14,7 @@ import java.security.NoSuchAlgorithmException;
...
@@ -14,12 +14,7 @@ import java.security.NoSuchAlgorithmException;
import
java.security.SecureRandom
;
import
java.security.SecureRandom
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.*
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Locale
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -135,11 +130,6 @@ public class CommonUtil {
...
@@ -135,11 +130,6 @@ public class CommonUtil {
return
result
;
return
result
;
}
}
public
static
void
main
(
String
[]
args
)
{
boolean
b
=
checkPassword
(
"1234qwe123"
);
System
.
out
.
println
(
b
);
}
/**
/**
* 密码验证
* 密码验证
* (至少由8位及以上大写字母、小写字母、数字与特殊符号等4类中3类混合)
* (至少由8位及以上大写字母、小写字母、数字与特殊符号等4类中3类混合)
...
@@ -314,10 +304,11 @@ public class CommonUtil {
...
@@ -314,10 +304,11 @@ public class CommonUtil {
if
(
StringUtils
.
isEmpty
(
idcard
)
||
(
idcard
.
length
()
<
8
))
{
if
(
StringUtils
.
isEmpty
(
idcard
)
||
(
idcard
.
length
()
<
8
))
{
return
idcard
;
return
idcard
;
}
}
String
res
=
StringUtils
.
overlay
(
idcard
,
"***********
***"
,
0
,
14
);
String
res
=
StringUtils
.
overlay
(
idcard
,
"***********
"
,
3
,
14
);
return
res
;
return
res
;
}
}
public
static
String
getCurDateStr
()
{
public
static
String
getCurDateStr
()
{
Date
date
=
new
Date
();
Date
date
=
new
Date
();
String
pattern
=
"yyyy-MM-dd"
;
String
pattern
=
"yyyy-MM-dd"
;
...
...
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