public class Sm2Util extends Object
| 构造器和说明 |
|---|
Sm2Util() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
decrypt(byte[] encryptData,
BigInteger privateKey) |
byte[] |
encrypt(String input,
org.bouncycastle.math.ec.ECPoint publicKey)
加密
|
SM2KeyPair |
generateKeyPair()
获得公私钥对
|
static void |
main(String[] args) |
static String |
printHexString(byte[] b) |
BigInteger |
random(BigInteger max) |
public static String printHexString(byte[] b)
public BigInteger random(BigInteger max)
public byte[] encrypt(String input, org.bouncycastle.math.ec.ECPoint publicKey)
input - 待加密消息MpublicKey - 公钥public void decrypt(byte[] encryptData,
BigInteger privateKey)
public SM2KeyPair generateKeyPair()
public static void main(String[] args)
Copyright © 2022. All rights reserved.