# algorithmNation **Repository Path**: xshuai/algorithmNation ## Basic Information - **Project Name**: algorithmNation - **Description**: 🍬国密算法 SM2加解密 SM2 SM3 SM4签名验签 National secret algorithm SM2 encryption and decryption SM2 SM3 SM4 signature verification - **Primary Language**: Java - **License**: MIT - **Default Branch**: master - **Homepage**: https://www.ydxiaoshuai.cn - **GVP Project**: No ## Statistics - **Stars**: 136 - **Forks**: 66 - **Created**: 2018-06-14 - **Last Updated**: 2025-04-28 ## Categories & Tags **Categories**: security-dev **Tags**: 算法, 国密算法, 非对称算法 ## README [![Version](https://img.shields.io/badge/version-0.0.1-brightgreen.svg)](https://www.xsshome.cn/) [![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) [![JDK 1.8](https://img.shields.io/badge/JDK-1.8-green.svg "JDK 1.8")]() [![作者](https://img.shields.io/badge/%E4%BD%9C%E8%80%85-%E5%B0%8F%E5%B8%85%E4%B8%B6-7AD6FD.svg)](https://www.xsshome.cn/) SM2生成证书请移步:[https://blog.csdn.net/u010651369/article/details/76907312](https://blog.csdn.net/u010651369/article/details/76907312) sm2root.cer是一个国密证书测试文件。可以自行下载查看相关证书内容哦 QQ:783021975 ### 关注码小帅获取最新功能更新 ![码小帅](https://images.gitee.com/uploads/images/2021/0518/164321_b70506da_131538.jpeg "码小帅.jpg") SM2证书生成相关文档&博文地址(有完全免费开源的代码):[http://gm4j.mydoc.io/](http://gm4j.mydoc.io/) 新加1.SMCertUtil 生成国密证书工具类 2. XSCertExtension 拓展信息工具类 目录结构 ``` cn.xsshome.algorithmNation ├── sample //测试代码 └── Test //SM2加解密示例代码 └── TestSign //SM2签名验签示例代码 └── TestCert //SM2证书生成调用示例代码 └── TestSM4 //SM4加解密示例代码 ├── vo //相关Java对象 └── util //工具类包含了SM2 SM3等一系列工具类 ``` 所需依赖包 ``` org.bouncycastle bcpkix-jdk15on 1.57 org.bouncycastle bcmail-jdk15on 1.56 com.xiaoleilu hutool-all 3.0.9 ```