public class RSA2Utils extends Object
| 构造器和说明 |
|---|
RSA2Utils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
doSign(String content,
String charset,
PrivateKey priKey)
私钥签名
|
static boolean |
doVerify(String content,
String charset,
PublicKey pubKey,
String sign)
公钥验签
|
static PrivateKey |
getPrivateKeyFromPKCS8(String privateKey)
生成私钥对象
|
static PublicKey |
getPublicKeyFromX509(String publicKey)
生成公钥对象
|
public static String doSign(String content, String charset, PrivateKey priKey) throws Exception
content - charset - Exceptionpublic static boolean doVerify(String content, String charset, PublicKey pubKey, String sign) throws Exception
content - charset - sign - Exceptionpublic static PrivateKey getPrivateKeyFromPKCS8(String privateKey) throws Exception
privateKey - ExceptionCopyright © 2022. All rights reserved.