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
Table of contents 1. Effect Demonstration 2. Impl...
Basic syntax: <input type="hidden" na...
Table of contents Start by clicking the input box...
Table of contents Problem Description Solution Pr...
Judging from the results, there is no fixed patte...
When exporting data to operations, it is inevitab...
This article uses an example to illustrate the us...
This article example shares the specific code for...
1. Introduction Containers use a sandbox mechanis...
I am currently learning about Redis and container...
Table of contents Experimental environment Instal...
I personally feel that the development framework ...
Often, after a web design is completed, the desig...
Sometimes you may need to modify or add exposed p...
Table of contents Preface Why do we need to encap...