public class SignUtil extends Object
| 构造器和说明 |
|---|
SignUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
Base64Decoder(String data) |
static String |
Base64Encoder(String data) |
static String |
createSign(String data,
String privateKey) |
static String |
fomatParameter(Map<String,Object> map,
String separator) |
static PrivateKey |
getPrivateKey(String key) |
static PublicKey |
getPublicKey(String key) |
static byte[] |
sign(byte[] cipherText,
PrivateKey privateKey) |
static boolean |
verify(byte[] cipherText,
PublicKey publicKey,
byte[] sign) |
static boolean |
verySignSimple(String signData,
String pubKey,
String sign) |
public static PrivateKey getPrivateKey(String key) throws Exception
Exceptionpublic static byte[] sign(byte[] cipherText,
PrivateKey privateKey)
throws Exception
Exceptionpublic static boolean verify(byte[] cipherText,
PublicKey publicKey,
byte[] sign)
throws Exception
ExceptionCopyright © 2021. All rights reserved.