com.taotao.boot.sensitive.houbb.api.ISensitive Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 2020-2030, Shuigedeng ([email protected] & https://blog.taotaocloud.top/).
*
* Licensed 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
*
* https://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.
*/
package com.taotao.boot.sensitive.houbb.api;
/**
* 脱敏接口
*
* @param 参数类型
*/
public interface ISensitive {
/**
* 对象进行脱敏操作 原始对象不变,返回脱敏后的新对象 1. 为什么这么设计? 不能因为脱敏,就导致代码中的对象被改变。否则代码逻辑会出现问题。
*
* @param object 原始对象
* @param config 配置信息
* @return 脱敏后的新对象
*/
T desCopy(final T object, final ISensitiveConfig config);
/**
* 返回脱敏后的 json 1. 避免 desCopy 造成的对象新建的性能浪费
*
* @param object 对象
* @param config 配置信息
* @return json
*/
String desJson(final T object, final ISensitiveConfig config);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy