| 程序包 | 说明 |
|---|---|
| lich.tool.encryptionAndDecryption.core | |
| lich.tool.encryptionAndDecryption.core.asymmetric |
| 限定符和类型 | 方法和说明 |
|---|---|
protected static SM1Ext |
Base.getSm1ext() |
protected static SM4Ext |
Base.getSm4ext() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
AsymmetricTool.decrypt(byte[] encodedataByte,
PrivateKey privateKey,
String algorithm)
私钥解密
GM模式 加密数据结构为C1C2C3 或SM2Cipher der格式
|
static byte[] |
AsymmetricTool.encrypt(byte[] data,
PublicKey publicKey,
String algorithm)
公钥加密
GM模式 加密数据结构为SM2Cipher der格式
|
static byte[] |
PublicKeyTool.getPublicKeyByte(PublicKey publicKey)
获取公钥byte
|
static byte[] |
AsymmetricTool.sign(byte[] ori,
PrivateKey privateKey,
String algorithm)
签名
|
static byte[] |
AsymmetricTool.sign(byte[] ori,
PrivateKey privateKey,
X509Certificate cert)
签名
|
static byte[] |
PrivateKeyTool.toEnvelopedKeyBlobByGMPrivateKey(PrivateKey gmPrivateKey)
GM私钥导出(使用内置密钥加密)
|
static byte[] |
PrivateKeyTool.toEnvelopedKeyBlobByGMPrivateKey(PrivateKey gmPrivateKey,
PublicKey encGmPublicKey)
GM私钥导出
|
static byte[] |
KeyStoreTool.toPKCS10(KeyPair kp,
String dn,
String algorithm)
生成p10证书申请请求
|
static byte[] |
KeyStoreTool.toPKCS10(PrivateKey privateKey,
PublicKey publicKey,
String dn,
String algorithm)
生成p10证书申请请求
|
static boolean |
AsymmetricTool.verify(byte[] sign,
byte[] ori,
PublicKey publicKey,
String algorithm)
验签
|
static boolean |
AsymmetricTool.verify(byte[] sign,
byte[] ori,
X509Certificate cert)
验签
|
Copyright © 2021. All rights reserved.