大型电子商务网站建设/关键词推广软件排名

大型电子商务网站建设,关键词推广软件排名,海口做网站哪家好,企业网站怎么推广添加邮件脱敏规则: // 123123123qq.com,将前4个字符脱敏 12312****qq.com 代码重写MaskAlgorithm相关方法: /** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE…

 添加邮件脱敏规则:

// 123123123@qq.com,将@前4个字符脱敏
12312****@qq.com

代码重写MaskAlgorithm相关方法: 

/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements.  See the NOTICE file distributed with* this work for additional information regarding copyright ownership.* The ASF licenses this file to You under the Apache License, Version 2.0* (the "License"); you may not use this file except in compliance with* the License.  You may obtain a copy of the License at**     http://www.apache.org/licenses/LICENSE-2.0** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.* See the License for the specific language governing permissions and* limitations under the License.*/import com.google.common.base.Strings;
import org.apache.shardingsphere.mask.algorithm.MaskAlgorithmPropertiesChecker;
import org.apache.shardingsphere.mask.spi.MaskAlgorithm;import java.util.Properties;/*** Mask after special-chars algorithm.*/
public final class MaskBeforeSpecialNCharsAlgorithm implements MaskAlgorithm<Object, String> {private static final String SPECIAL_CHARS = "special-chars";private static final String REPLACE_CHAR = "replace-char";private static final String FIRST_N = "first-n";private String specialChars;private Character replaceChar;private Integer firstN;@Overridepublic void init(final Properties props) {specialChars = createSpecialChars(props);replaceChar = createReplaceChar(props);firstN = createFirstN(props);}private Integer createFirstN(final Properties props) {MaskAlgorithmPropertiesChecker.checkPositiveInteger(props, FIRST_N, this);return Integer.parseInt(props.getProperty(FIRST_N));}private String createSpecialChars(final Properties props) {MaskAlgorithmPropertiesChecker.checkAtLeastOneChar(props, SPECIAL_CHARS, this);return props.getProperty(SPECIAL_CHARS);}private Character createReplaceChar(final Properties props) {MaskAlgorithmPropertiesChecker.checkSingleChar(props, REPLACE_CHAR, this);return props.getProperty(REPLACE_CHAR).charAt(0);}@Overridepublic String mask(final Object plainValue) {String result = null == plainValue ? null : String.valueOf(plainValue);if (Strings.isNullOrEmpty(result)) {return result;}int index = result.contains(specialChars) ? result.indexOf(specialChars) : -1;char[] chars = result.toCharArray();for (int i = index-firstN; i < index; i++) {chars[i] = replaceChar;}return new String(chars);}@Overridepublic String getType() {return "MASK_BEFORE_SPECIAL_N_CHARS";}
}

 pom: 依赖版本5.5.0

        <!-- 相关依赖 --><dependency><groupId>org.apache.shardingsphere</groupId><artifactId>shardingsphere-jdbc</artifactId></dependency><dependency><groupId>org.yaml</groupId><artifactId>snakeyaml</artifactId></dependency><dependency><groupId>org.apache.shardingsphere</groupId><artifactId>shardingsphere-infra-common</artifactId></dependency><dependency><groupId>io.swagger</groupId><artifactId>swagger-annotations</artifactId><version>${swaggerannotations.version}</version></dependency><dependency><groupId>org.apache.shardingsphere</groupId><artifactId>shardingsphere-mask-api</artifactId></dependency><dependency><groupId>org.apache.shardingsphere</groupId><artifactId>shardingsphere-mask-core</artifactId></dependency>

项目中添加如下配置: 

org.apache.shardingsphere.mask.spi.MaskAlgorithm文件中增加脱敏类: 

com.xx.xxx.plugin.MaskBeforeSpecialNCharsAlgorithm

 yml中如下配置:

rules:- !MASKtables:ac_user:columns:password:maskAlgorithm: md5_maskemail:maskAlgorithm: mask_before_special_n_chars_maskphone_number:maskAlgorithm: keep_first_n_last_m_maskmaskAlgorithms:md5_mask:type: MD5mask_before_special_n_chars_mask:type: MASK_BEFORE_SPECIAL_N_CHARSprops:special-chars: '@'replace-char: '*'first-n: 4

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/897506.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

软件IIC和硬件IIC的主要区别,用标准库举例!

学习交流792125321&#xff0c;欢迎一起加入讨论&#xff01; 在学习iic的时候&#xff0c;我们经常会遇到软件 IC和硬件 IC,它两到底有什么区别呢&#xff1f; 软件 IC&#xff08;模拟 IC&#xff09;和硬件 IC&#xff08;外设 IC&#xff09;是两种实现 IC 总线通信的方式…

店匠科技携手 PayPal 升级支付体验,助力独立站商家实现全球增长

在全球化电商竞争加剧的背景下,独立站为无数商户插上了通向事业成功的翅膀。然而,搭建店铺框架容易,真正实现有效运营却充满挑战。只有当各个环节如齿轮般严丝合缝,独立站运营才能更好地助推行进,实现稳健增长。如今,独立站商家面临着全链路运营的多重挑战。从品牌塑造、营销推…

密码学 网络安全 科普 网络安全密码技术

网络加密包括密码技术和网络加密方法两个方面。 一、 密码技术   密码技术一般分为常规密码和公钥密码。   常规密码是指收信方和发信方使用相同的密钥&#xff0c;即加密密钥和解密密钥是相同或等价的。比较著名的常规密码算法有DES及其各种变形、IDEA、FEAL、Skipjack…

P8686 [蓝桥杯 2019 省 A] 修改数组--并查集 or Set--lower_bound()的解法!!!

P8686 [蓝桥杯 2019 省 A] 修改数组--并查集 题目 并查集解析代码【并查集解】 Set 解法解析lower_bound代码 题目 并查集解析 首先先让所有的f&#xff08;i&#xff09;i&#xff0c;即每个人最开始的祖先都是自己&#xff0c;然后就每一次都让轮到那个数的父亲1&#xff08…

C++编程:进阶阶段—4.2对象

目录 4.2 对象特征 4.2.1 构造函数和析构函数 4.2.2 构造函数的分类 4.2.3 拷贝函数调用时机 4.2.4 构造函数调用规则 4.2.5 深拷贝与浅拷贝 4.2.6 初始化列表 4.2.7 类对象作为类成员 4.2.8 静态成员 4.2.9 成员变量和成员函数的存储 4.2.10 this指针 4.2.11 空指针…

【MySQL_04】数据库基本操作(用户管理--配置文件--远程连接--数据库信息查看、创建、删除)

文章目录 一、MySQL 用户管理1.1 用户管理1.11 mysql.user表详解1.12 添加用户1.13 修改用户权限1.14 删除用户1.15 密码问题 二、MySQL 配置文件2.1 配置文件位置2.2 配置文件结构2.3 常用配置参数 三、MySQL远程连接四、数据库的查看、创建、删除4.1 查看数据库4.2 创建、删除…

配置 Thunderbird 以使用 outlook 邮箱

配置 Thunderbird 以使用 outlook 邮箱 thunder bird 作为邮件客户端非常好用&#xff0c;不用每次登录邮箱网页端查看邮件&#xff0c;直接打开配置好的 thunder bird 即可免登录查看邮件。 0. 什么是 Thunder Bird ? https://www.thunderbird.net/zh-CN/ Thunderbird 创立…

Linux:多线程(三.POSIX信号量、生产消费模型、线程池)

目录 1. 生产者消费者模型 1.1 阻塞队列(BlockingQueue) 1.2 一个实际应用的例子 2. POSIX信号量 2.1 引入 2.2 回顾加深理解信号量 2.3 信号量的操作接口 3. 基于循环队列的生产消费模型 3.1 循环队列 3.2 整个项目 4. 线程池 4.1 概念 4.2 线程池实现 1. 生产者…

关于前后端整合和打包成exe文件的个人的总结和思考

前言 感觉有很多东西&#xff0c;不知道写什么&#xff0c;随便写点吧。 正文 前后端合并 就不说怎么开发的&#xff0c;就说点个人感觉重要的东西。 前端用ReactViteaxios随便写一个demo&#xff0c;用于CRUD。 后端用Django REST Framework。 设置前端打包 import { …

Android15 Camera框架中的StatusTracker

StatusTracker介绍 StatusTracker是Android15 Camera框架中用来协调Camera3各组件之间状态转换的类。 StatusTracker线程名&#xff1a;std::string("C3Dev-") mId "-Status" Camera3 StatusTracker工作原理 StatusTracker实现批处理&#xff08;状态…

利用OpenResty拦截SQL注入

需求 客户的一个老项目被相关部门检测不安全&#xff0c;报告为sql注入。不想改代码&#xff0c;改项目&#xff0c;所以想到利用nginx去做一些数据校验拦截。也就是前端传一些用于sql注入的非法字符或者数据库的关键字这些&#xff0c;都给拦截掉&#xff0c;从而实现拦截sql…

警惕AI神话破灭:深度解析大模型缺陷与禁用场景指南

摘要 当前AI大模型虽展现强大能力&#xff0c;但其本质缺陷可能引发系统性风险。本文从认知鸿沟、数据困境、伦理雷区、技术瓶颈四大维度剖析大模型局限性&#xff0c;揭示医疗诊断、法律决策等8类禁用场景&#xff0c;提出可信AI建设框架与用户防护策略。通过理论分析与实操案…

颠覆语言认知的革命!神经概率语言模型如何突破人类思维边界?

颠覆语言认知的革命&#xff01;神经概率语言模型如何突破人类思维边界&#xff1f; 一、传统模型的世纪困境&#xff1a;当n-gram遇上"月光族难题" 令人震惊的案例&#xff1a;2012年Google语音识别系统将 用户说&#xff1a;“我要还信用卡” 系统识别&#xff…

【Linux】详谈 基础I/O

目录 一、理解文件 狭义的理解&#xff1a; 广义理解&#xff1a; 文件操作的归类认知 系统角度 二、系统文件I/O 2.1 标志位的传递 系统级接口open ​编辑 open返回值 写入文件 读文件 三、文件描述符 3.1&#xff08;0 & 1 & 2&#xff09; 3.2 文件描…

超分之DeSRA

Desra: detect and delete the artifacts of gan-based real-world super-resolution models.DeSRA&#xff1a;检测并消除基于GAN的真实世界超分辨率模型中的伪影Xie L, Wang X, Chen X, et al.arXiv preprint arXiv:2307.02457, 2023. 摘要 背景&#xff1a; GAN-SR模型虽然…

Vue3 Pinia 符合直觉的Vue.js状态管理库

Pinia 符合直觉的Vue.js状态管理库 什么时候使用Pinia 当两个关系非常远的组件&#xff0c;要传递参数时使用Pinia组件的公共参数使用Pinia

Javaweb后端文件上传@value注解

文件本地存储磁盘 阿里云oss准备工作 阿里云oss入门程序 要重启一下idea&#xff0c;上面有cmd 阿里云oss案例集成 优化 用spring中的value注解

DeepSeek大语言模型下几个常用术语

昨天刷B站看到复旦赵斌老师说的一句话“科幻电影里在人脑中植入芯片或许在当下无法实现&#xff0c;但当下可以借助AI人工智能实现人类第二脑”&#xff08;大概是这个意思&#xff09; &#x1f49e;更多内容&#xff0c;可关注公众号“ 一名程序媛 ”&#xff0c;我们一起从 …

MYSQL之创建数据库和表

创建数据库db_ck &#xff08;下面的创建是最好的创建方法&#xff0c;如果数据库存在也不会报错&#xff0c;并且指定使用utf8mb4&#xff09; show databases命令可以查看所有的数据库名&#xff0c;可以找到刚刚创建的db_ck数据库 使用该数据库时&#xff0c;发现里面没有…

[pytest] 配置

这里写目录标题 PytestInitRun3. 根据命令行选项将不同的值传递给测试函数 Report1. 向测试报告标题添加信息2. 分析测试持续时间 pytest --durations33. 增量测试 - 测试步骤--junitxml{report}.xml1. testsuite1.1 在测试套件级别添加属性节点 record_testsuite_property 2. …