# encryption **Repository Path**: pychfarm_admin/encryption ## Basic Information - **Project Name**: encryption - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 6 - **Forks**: 3 - **Created**: 2021-03-18 - **Last Updated**: 2022-09-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # encryption ## 快速开始 1. 下载源码 ```shell git clone https://gitee.com/pychfarm_admin/encryption.git ``` 2. 从源码构件 ```shell cd encryption mvn clean install ``` 3. 生成RSA秘钥,可以使用项目中的`com.github.huifer.encryption.core.RSAEncrypt.generateKey`方法进行生成. 4. 选择需要加密的内容进行加密,具体使用项目中`com.github.huifer.encryption.core.RSAEncrypt.encrypt`方法进行加密 5. 修改SpringBoot项目的依赖,在配置文件中加入下面依赖 ```xml com.github.huifer encryption-core 1.0-SNAPSHOT ``` 6. 修改SpringBoot中 application.yml 文件或者 application.properties 文件,测试用例如下 ```properties abc=PWD[bMw8oqC/ma31JqF0DCuf5QWqSFRMigYw3fMBIIIfJ85vnmNnFbH9IcJfUHgbSmNHeITffToODwAygy4vKdzu6o1i1UQOd8w4nPKhnVJCLKqW5jmc3Yw+FkTIRBp63NJWzECVnRHqEK+bTxPMa1gfKql/2U45XxqeDSZOEXGeA+E=] ``` 7. 修改启动命令, 添加 `-Dencryption.rsa.privateKey=你的私钥` 8. 启动项目 ## 设计文档 - [设计文档](./doc/SpringBoot自定义加密解密.md)