public class TigerSignature extends Object
| 构造器和说明 |
|---|
TigerSignature() |
| 限定符和类型 | 方法和说明 |
|---|---|
static PrivateKey |
getPrivateKey(String algorithm,
InputStream ins) |
static PublicKey |
getPublicKey(String algorithm,
InputStream ins) |
static String |
getSignContent(Map<String,Object> request) |
static boolean |
rsaCheckContent(String content,
String sign,
String publicKey,
String charset)
使用公钥验签
|
static String |
rsaSign(String content,
String privateKey,
String charset)
使用私钥签名
|
public static String getSignContent(Map<String,Object> request)
request - request parampublic static String rsaSign(String content, String privateKey, String charset) throws TigerApiException
content - 待签内容privateKey - 私钥charset - 字符集,如UTF-8, GBK, GB2312TigerApiExceptionpublic static PrivateKey getPrivateKey(String algorithm, InputStream ins) throws Exception
Exceptionpublic static boolean rsaCheckContent(String content, String sign, String publicKey, String charset) throws TigerApiException
content - 原内容sign - 加签后的内容publicKey - 公钥charset - 字符集TigerApiException - Api异常public static PublicKey getPublicKey(String algorithm, InputStream ins) throws Exception
ExceptionCopyright © 2018. All rights reserved.