2 Star 4 Fork 1

feizhaiyou / encrypt-spring-boot-starter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

开源地址

使用说明

介绍

对SpringWeb项目中SpringMVC注解(@RequestMapping@GetMapping@PostMapping@PutMapping@DeleteMapping)的接口参数进行脱敏与加解密,仅限于Http请求中字符串类型的参数数据生效,可进行充分扩展,可自进行定义脱敏、加解密等。

版本说明

  • 1.0.0版本

    内置加密方式:AES、RSA(默认加密模式)

    高级用法:支持

  • 1.0.1版本【latest-version】

    内置加密方式:支持AES、RSA加密,新增国密SM2、SM4加密方式

    增加内置加密器密钥生成:[内置加密器密钥生成](# 内置加密器密钥生成)

    高级用法:支持,文档更新[自定义加密器](# 自定义加密器)配置及使用方式

    日志输出:DEBUG级别支持详细日志方便调试

导入依赖

  • Maven:

    依赖已发布至Maven中央仓库,可直接引入依赖。

    https://mvnrepository.com/artifact/com.feizhaiyou.encrypt/encrypt-spring-boot-starter

    <dependency>
      <groupId>com.feizhaiyou.encrypt</groupId>
      <artifactId>encrypt-spring-boot-starter</artifactId>
      <version>${latest-version}</version>
    </dependency>
  • Gradle

    请自行替换版本号

    // https://mvnrepository.com/artifact/com.feizhaiyou.encrypt/encrypt-spring-boot-starter
    implementation group: 'com.feizhaiyou.encrypt', name: 'encrypt-spring-boot-starter', version: '1.0.0'
  • 本地:

    git拉取代码到本地,执行mvn install(选择profilelocal,例如:mvn clean install -Plocal)打包下载到本地Maven仓库,项目maven pom引入

    <dependency>
      <groupId>com.feizhaiyou.encrypt</groupId>
      <artifactId>encrypt-spring-boot-starter</artifactId>
      <version>${latest-version}</version>
    </dependency>

maven依赖说明

maven中央仓库不支持自行提交jar包,因此我们只能将jar包发布到它指定的第三方maven仓库(sonatype),这会导致maven中央和其他镜像仓库(阿里云等)有同步延迟。解决方案:

  1. 使用源码直接安装到本地maven仓库

  2. 修改远程maven仓库地址

        <mirror>
          <id>central</id>
          <name>sonatype-central</name>
          <url>https://s01.oss.sonatype.org/content/groups/public/</url>
          <mirrorOf>central</mirrorOf>
        </mirror>

项目配置

对称加密:AES 密钥请自行生成【[内置加密器密钥生成](# 内置加密器密钥生成)】

fzy:
  security:
    #是否启动脱敏与加密,默认true
    enable: true
    #加密后的编码模式:base64、hex,默认base64
    mode: base64
    #参数字段递归深度,默认5
    max-deep: 5
    #加密方式:AES、RSA,默认AES(1.0.1新增内置SM2和SM4加密方式)
    type: AES
    #对称加密密钥 密钥请自行生成
    secret: +6cuvzvyrFZpRG9pf3r7eQ==
    #脱敏与加解密实体类所在包 支持包前缀和正则匹配
    class-package:
      - com.feizhaiyou.test.entity
    #字符集
    charset: UTF-8

非对称加密:RSA privateKey与publicKey请自行生成【[内置加密器密钥生成](# 内置加密器密钥生成)】

fzy:
  security:
    enable: true
    mode: hex
    max-deep: 5
    type: RSA
    class-package:
      - com.feizhaiyou.test.entity
    charset: UTF-8
    public-key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCQwb536Gb2eZ60H/4VQRJUpod0M04yCR6IaEdgAbBACWvc5E2s7gCipO9IQB5tiU08JSQ2Mmfg88uGffK6z5YcKJ/CNWByiNHL3B2GzsgMMBh2a5Dba+KqA3ZFkeXhkw8htej18mM4Xw1KGytAni7sypzjynC+4/m7FcewB6BBxQIDAQAB
    private-key: MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJDBvnfoZvZ5nrQf/hVBElSmh3QzTjIJHohoR2ABsEAJa9zkTazuAKKk70hAHm2JTTwlJDYyZ+Dzy4Z98rrPlhwon8I1YHKI0cvcHYbOyAwwGHZrkNtr4qoDdkWR5eGTDyG16PXyYzhfDUobK0CeLuzKnOPKcL7j+bsVx7AHoEHFAgMBAAECgYBC6av3lW/ywuk/bgJvJLMqegfnCMg+jMSWXU2Q7XbhQvmfE9Fr/GBCzmblSO5Hx83x3WFNxCMMcuVDd/i5rbc+/fKoYyEhuOI91bHRxWR2M1VkNAZpUMeccGM/g15/p0P4pNEFYEaXkUZ170Je8aaECmr8v24ukvGlKFE38RuWgQJBANZCIkBxtY3H3CnT4LXX8NaJlWh7SpSZJsazwblDbubCMBJ+3qSaKxCE9v3d8F9QVPvZKgwd7uWIXHtcDygigVUCQQCs9U8NpV0VgZKbJzEuxaelpmi7eCe02hc5C1NVxQ14vRmV8na//GYOI6s0fNZjkPPGdRvmsTRpDYAeR3U/qX6xAkA+aed2ZGlh0s2Uta7o6e2zYULPu9Ke9Poxud197WHaAMlmKeULiAlxd3pHu6Yw7cLD1qAEBZg47v8ZxFh59Ys9AkEAjk4fxxiB6An+OA4dF2ClOVQb4/NOqCyw4syAupcxKGBeRtOCBSCET6nlWYBFXRKMoIMGe97dQnpLKZ6dx82LYQJBAJADjI2XGtg5HlgIzOLMMsTJ4+3OqCiJLoNAkmozckSQveyuh0Jh0Vvs1nTdfR1DMbsrIR2Me/ugPXzVvtEpU80=

内置加密器密钥生成

  • 1.0.1新增
    public static void main(String[] args) {
        // 调用对应的加密器的generateKey()方法即可
        Map<String, String> keyMap = SM2Processor.generateKey();
        System.out.println("SM2 publicKey: " + keyMap.get("PUB"));
        System.out.println("SM2 privateKey: " + keyMap.get("PRV"));
        // 支持指定密钥字符串的编码模式:SecurityMode.BASE64, SecurityMode.HEX
        String key = SM4Processor.generateKey(SecurityMode.HEX);
        System.out.println("SM4 secret: " + key);
    }

说明:

调用内置加密器的generateKey()静态方法即可,对称加密直接返回密钥String,非对称加密返回Map<String, String>map.get("PUB")为生成的公钥,map.get("PRV")为生成的私钥。

内置加密器:

AES:com.feizhaiyou.encrypt.codec.AESProcessor

RSA:com.feizhaiyou.encrypt.codec.RSAProcessor

SM2:com.feizhaiyou.encrypt.codec.SM2Processor

SM4:com.feizhaiyou.encrypt.codec.SM4Processor

响应数据脱敏@Sensitive

在实体类属性或者接口方法(针对直接响应字符串的情况)上使用@Sensitive注解即可。

注解属性说明:

参数名 类型 默认值 说明
required boolean true 是否开启字段加密,默认开启
type String com.feizhaiyou.encrypt.constants.SensitiveType.DEFUALT 脱敏参数类型

注意:@Sensitive注解必须用在字符串类型的参数字段或接口返回类型为字符串的接口方法上。

实体类字段使用@Sensitive注解

package com.feizhaiyou.test.entity;

import com.feizhaiyou.encrypt.annotation.Sensitive;
import com.feizhaiyou.encrypt.constants.SensitiveType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author ls
 * @since 2023-07-28
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class User {

    private String id;

    @Sensitive(type = SensitiveType.CHINESE_NAME)
    private String name;

    @Sensitive(type = SensitiveType.ID_CARD)
    private String idCard;

    @Sensitive(type = SensitiveType.EMAIL)
    private String email;

    @Sensitive(type = SensitiveType.MOBILE_PHONE)
    private String phone;

    private List<Address> addressList;
}
package com.feizhaiyou.test.entity;

import com.feizhaiyou.encrypt.annotation.Sensitive;
import com.feizhaiyou.encrypt.constants.SensitiveType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author ls
 * @since 2023-07-28
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Address {

    private String id;

    @Sensitive(type = SensitiveType.ADDRESS)
    private String address;

    private String areaCode;
}

Controller

package com.feizhaiyou.test.controller;

import com.feizhaiyou.encrypt.annotation.Sensitive;
import com.feizhaiyou.test.entity.Address;
import com.feizhaiyou.test.entity.Result;
import com.feizhaiyou.test.entity.User;
import org.springframework.web.bind.annotation.*;

import java.util.Collections;
import java.util.UUID;

/**
 * @author ls
 * @since 2023-07-28
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @GetMapping("/get/{id}")
    public Result get(@PathVariable("id") String id) {
        User user = User.builder()
                .id(id)
                .idCard("110222199703036666")
                .email("243607654@qq.com")
                .name("热巴")
                .phone("13939393939")
                .addressList(Arrays.asList(Address.builder()
                        .address("北京市东城区长安街")
                        .areaCode("100000")
                        .id(UUID.randomUUID().toString())
                        .build())).build();
        return Result.OK(user);
    }
}

PostMan调用测试:

接口方法上使用@Sensitive注解

Controller

package com.feizhaiyou.test.controller;

import com.feizhaiyou.encrypt.annotation.Sensitive;
import com.feizhaiyou.test.entity.Address;
import com.feizhaiyou.test.entity.Result;
import com.feizhaiyou.test.entity.User;
import org.springframework.web.bind.annotation.*;

import java.util.Collections;
import java.util.UUID;

/**
 * @author ls
 * @since 2023-07-21
 */
@RestController
@RequestMapping("/test")
public class TestController {
    
    @GetMapping("/getAddress")
    @Sensitive
    public String getAddress() {
        return "北京市东城区长安街";
    }

}

PostMan调用测试:

响应请求参数加解密@Security

在实体类属性或者接口方法(针对直接响应字符串的情况)上使用@Security注解即可。

注解属性说明:

参数名 类型 默认值 说明
encrypt boolean true 是否对响应加密,默认开启
decrypt boolean true 是否对请求解密,默认开启

注意:@Security注解必须用在字符串类型的参数(实体类属性或方法参数)或接口返回类型为字符串的接口方法上。

实体类字段使用@Security注解

package com.feizhaiyou.test.entity;

import com.feizhaiyou.encrypt.annotation.Security;
import com.feizhaiyou.encrypt.annotation.Sensitive;
import com.feizhaiyou.encrypt.constants.SensitiveType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class User {

    private String id;

    // name 即加密又解密
    @Security
    private String name;

    // idCard 不进行解密只加密
    @Security(decrypt = false)
    private String idCard;

    // email 不进行加密只解密
    @Security(encrypt = false)
    private String email;

    private String phone;

    private List<Address> addressList;
}
package com.feizhaiyou.test.entity;

import com.feizhaiyou.encrypt.annotation.Security;
import com.feizhaiyou.encrypt.annotation.Sensitive;
import com.feizhaiyou.encrypt.constants.SensitiveType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author ls
 * @since 2023-07-28
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Address {

    private String id;

    @Security
    private String address;

    private String areaCode;
}

Controller

    @PostMapping("/post/{id}")
    public Result get(@PathVariable("id") String id, @RequestBody User user) {
        System.out.println("id = " + id + ", user = " + user);
        return Result.OK(user);
    }

PostMan调用测试:

控制台输出:

接口方法中使用@Security注解

Controller

    @GetMapping("/getEmail")
    @Security
    public String getEmail(@Security String name) {
        System.out.println("name = " + name);
        return "243607654@qq.com";
    }

PostMan调用测试:

控制台输出:

说明:

用在方法上,可以对接口响应的字符串进行加密

用在参数中,可以对接口请求参数的字符串进行解密

高级用法

自定义加密器

1.实现SecurityProcessor接口

实现com.feizhaiyou.encrypt.codec.SecurityProcessor接口,实现byte[] encrypt(byte[] data)加密方法和byte[] decrypt(String text)解密方法,例如:

package com.feizhaiyou.test.codec;

import cn.hutool.core.codec.Base64Encoder;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.HexUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.Mode;
import cn.hutool.crypto.Padding;
import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.symmetric.DES;
import com.feizhaiyou.encrypt.codec.SecurityProcessor;
import com.feizhaiyou.encrypt.constants.SecurityMode;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * 自定义加密器实现
 * 加密模式:DES/CTS/PKCS5Padding
 *
 * @author ls
 */
@Data
@Slf4j
public class MyProcessor implements SecurityProcessor {

    private String secret;

    private String salt;

    private DES des;

    /**
     * DES/CTS/PKCS5Padding
     *
     * @param secret 密钥
     * @param salt   盐(偏移量)8字节
     */
    public MyProcessor(String secret, String salt) {
        this.secret = secret;
        this.salt = salt;
        this.des = new DES(Mode.CTS, Padding.PKCS5Padding, SecureUtil.decode(secret), salt.getBytes());
    }

    @Override
    public byte[] decrypt(String text) {
        return des.decrypt(text);
    }

    @Override
    public byte[] encrypt(byte[] data) {
        return des.encrypt(data);
    }

    /**
     * 以base64编码生成 DES/CTS/PKCS5Padding 秘钥
     *
     * @return
     */
    public static String generateKey() {
        return generateKey(SecurityMode.BASE64);
    }

    /**
     * 生成 DES/CTS/PKCS5Padding 秘钥
     *
     * @param type {@link SecurityMode} 编码模式
     * @return
     */
    public static String generateKey(SecurityMode type) {
        byte[] keyBytes = SecureUtil.generateKey("DES/CTS/PKCS5Padding").getEncoded();
        switch (type) {
            case HEX:
                return HexUtil.encodeHexStr(keyBytes);
            case BASE64:
            default:
                return Base64Encoder.encode(keyBytes);
        }
    }

    public static void main(String[] args) {
        String secret = generateKey();
        System.out.println(secret);
        MyProcessor processor = new MyProcessor("KRxwmyr37N8=", "12345678");
        byte[] encrypt = processor.encrypt("北京市东城区长安街".getBytes());
        String encode1 = Base64Encoder.encode(encrypt);
        System.out.println(encode1);
        byte[] decrypt = processor.decrypt(encode1);
        System.out.println(StrUtil.str(decrypt, CharsetUtil.CHARSET_UTF_8));
    }
}

2.将自定义加密器添加到Spring容器

package com.feizhaiyou.test;

import com.feizhaiyou.encrypt.codec.SecurityProcessor;
import com.feizhaiyou.test.codec.MyProcessor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * TestApplication
 *
 * @author Jason
 */
@SpringBootApplication
@EnableAspectJAutoProxy
public class TestApplication {

    public static void main(String[] args) {
        SpringApplication.run(TestApplication.class);
        System.out.println("启动成功");
    }

    @Bean
    @ConditionalOnMissingBean
    // 定义fzy.security.type属性值为MY时加载此加密器
    @ConditionalOnProperty(prefix = "fzy.security", name = "type", havingValue = "MY")
    public SecurityProcessor myProcessor() {
        // 密钥和加盐可从配置文件中读取
        return new MyProcessor("KRxwmyr37N8=", "12345678");
    }
}

3.配置文件配置

server:
  port: 1010
logging:
  level:
    # 日志输出
    com.feizhaiyou.encrypt: debug
    org.springframework: warn
fzy:
  security:
    enable: true
    mode: base64
    max-deep: 5
    # 配置为自定义的加密器
    type: MY
    class-package:
      - com.feizhaiyou.test.entity
    charset: UTF-8

4.启动

DEBUG级日志输出加载的自定义加密器

开源项目

  • Hutool是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] 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 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.

简介

整合SpringBoot可对Web项目的HTTP接口参数进行脱敏与加解密,通过注解的方式直接使用加解密,支持AES、RSA,可自定义脱敏与加解密配置。 展开 收起
Java
Apache-2.0
取消

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/feizhaiyou/encrypt-spring-boot-starter.git
git@gitee.com:feizhaiyou/encrypt-spring-boot-starter.git
feizhaiyou
encrypt-spring-boot-starter
encrypt-spring-boot-starter
master

搜索帮助