1. Data desensitization explanationIn daily development needs, data desensitization is often encountered. For example, ID card numbers and mobile phone numbers need to be partially replaced with *. This can protect sensitive privacy information to a certain extent. So what is data desensitization? In cases involving customer security data or some commercially sensitive data, real data will be modified and provided for testing without violating system rules. For example, personal information such as ID number, mobile phone number, card number, customer number, etc. need to be desensitized. 2. Data Desensitization ImplementationData desensitization can be implemented by processing when searching for data in the database, or by processing after the data is found. The MySQL database query processing is documented here, which is implemented using mysql string functions. 3. SQL data desensitization implementation CONCAT(), LEFT() and RIGHT() string functions are used in combination. Please see the specific implementation below. CONCAT(str1,str2,…): Returns the string generated by the concatenation parameters Phone number desensitization sql: SELECT mobilePhone AS phone number before desensitization,CONCAT(LEFT(mobilePhone,3), '********' ) AS phone number after desensitization FROM t_s_user ID card number desensitization sql: Reference: https://blog.csdn.net/eagle89/article/details/80309608 This is the end of this article about the implementation of MYSQL (telephone number, ID card) data desensitization. For more relevant MYSQL data desensitization content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Docker-compose image release process analysis of springboot project
>>: Detailed explanation of the new background properties in CSS3
mysql correctly cleans up binlog logs Preface: Th...
The usage format of the mysqladmin tool is: mysql...
Asynchronous replication MySQL replication is asy...
When displaying long data in HTML, you can cut off...
1. Float: The main purpose is to achieve the effe...
1. Alipay method: Alipay method: Click Alipay to ...
Effect screenshots: Implementation code: Copy code...
Table of contents 1. What is a trigger? 2. Create...
Recently, I came across a webpage that had images ...
Initialize Dockerfile Assuming our project is nam...
Table of contents No slots Vue2.x Slots With slot...
The W3C standardization process is divided into 7...
1. Commonjs Commonjs is a custom module in nodejs...
Table of contents Class Component Functional Comp...
This article records the detailed installation pr...