# JwtOrAesOrRsa **Repository Path**: antLaddieStudy/JwtOrAesOrRsa ## Basic Information - **Project Name**: JwtOrAesOrRsa - **Description**: 本仓库存在两个工具类,分别是JwtToken的生成和安全工具(生成RSA证书和AES加密);对于证书生成请使用JDK1.8版本,否则会出现问题。 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 3 - **Created**: 2023-10-07 - **Last Updated**: 2025-02-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 关于证书的方法总览说明: ### KeyPairUtils类:generateKeyPair方法:生成公钥、密钥、数字证书、密钥库(请使用JDK1.8) ### BaseParsing类:解析 - certificateWhetherOverdue方法:校验证书是否过期 - analysisKeystorePrivateKey方法:根据传入的密钥库流信息解析密钥库内的指定别名的私钥信息 - analysisKeystoreCertificates方法:根据传入的密钥库流信息解析密钥库内的全部证书 - certificateParsing方法:证书解析 - publicKeyParsing方法:根据传入的公钥信息流对象进行解析,返回具体的Base64格式公钥;(这里以我生成的公钥来解析) - privateKeyParsing方法:根据传入的私钥信息流对象进行解析,返回具体的Base64格式私钥;(这里以我生成的私钥来解析) - certificateVerificationTime方法:校验证书信息是否过期 ### EncryptAndDecryptUtils类:加密解密 - keystorePrivateKeyDecrypt方法:根据密钥库内的私钥对密文进行解析, - certificatePublicKeyEncrypt方法:根据传入的证书信息,对明文进行加密 - simplePublicKeyEncrypt方法:简答加密(根据Base64的公钥字符串进行加密) - simplePrivateKeyDecrypt方法:简答解密(根据Base64的私钥字符串进行解密) ## 注:本工具类还包含JWT、AES的操作