public class GmTransmissionUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static CipherObj |
decrypt(String cipherText) |
static <T> T |
decrypt(String cipherText,
Class<T> clazz)
解密对象
|
static CipherObj |
decrypt(String cipherText,
String sm2PriKey)
解密
|
static <T> T |
decrypt(String cipherText,
String sm2PriKey,
Class<T> clazz)
解密对象
|
static String |
encrypt(String plaintext)
加密
|
static String |
encrypt(String plaintext,
String sm2PubKey)
加密
|
public static String encrypt(String plaintext, String sm2PubKey)
plaintext - 数据sm2PubKey - sm2的公钥public static CipherObj decrypt(String cipherText, String sm2PriKey) throws StringIndexOutOfBoundsException, ArrayIndexOutOfBoundsException, NullPointerException
cipherText - sm2PriKey - StringIndexOutOfBoundsExceptionArrayIndexOutOfBoundsExceptionNullPointerExceptionpublic static CipherObj decrypt(String cipherText) throws StringIndexOutOfBoundsException, ArrayIndexOutOfBoundsException, NullPointerException
public static <T> T decrypt(String cipherText, String sm2PriKey, Class<T> clazz) throws StringIndexOutOfBoundsException, ArrayIndexOutOfBoundsException, NullPointerException, com.fasterxml.jackson.core.JsonProcessingException
T - cipherText - sm2PriKey - clazz - StringIndexOutOfBoundsExceptionArrayIndexOutOfBoundsExceptionNullPointerExceptioncom.fasterxml.jackson.core.JsonProcessingExceptionpublic static <T> T decrypt(String cipherText, Class<T> clazz) throws StringIndexOutOfBoundsException, ArrayIndexOutOfBoundsException, NullPointerException, com.fasterxml.jackson.core.JsonProcessingException
T - cipherText - clazz - StringIndexOutOfBoundsExceptionArrayIndexOutOfBoundsExceptionNullPointerExceptioncom.fasterxml.jackson.core.JsonProcessingExceptionCopyright © 2023. All rights reserved.