public class RSAEncryptor extends BaseAsymmetricEncryptor
| 构造器和说明 |
|---|
RSAEncryptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
doDecrypt(String cipherTextBase64,
String charset,
String privateKey) |
protected String |
doEncrypt(String plainText,
String charset,
String publicKey) |
protected String |
doSign(String content,
String charset,
String privateKey) |
protected boolean |
doVerify(String content,
String charset,
String publicKey,
String sign) |
protected String |
getAsymmetricType() |
protected int |
getMaxDecryptBlockSize() |
protected int |
getMaxEncryptBlockSize() |
static PrivateKey |
getPrivateKeyFromPKCS8(String algorithm,
InputStream ins) |
static PublicKey |
getPublicKeyFromX509(String algorithm,
InputStream ins) |
protected String |
getSignAlgorithm() |
decrypt, encrypt, sign, verifyprotected String getSignAlgorithm()
protected String getAsymmetricType()
getAsymmetricType 在类中 BaseAsymmetricEncryptorprotected int getMaxDecryptBlockSize()
protected int getMaxEncryptBlockSize()
protected String doDecrypt(String cipherTextBase64, String charset, String privateKey) throws Exception
doDecrypt 在类中 BaseAsymmetricEncryptorExceptionprotected String doEncrypt(String plainText, String charset, String publicKey) throws Exception
doEncrypt 在类中 BaseAsymmetricEncryptorExceptionprotected String doSign(String content, String charset, String privateKey) throws Exception
doSign 在类中 BaseAsymmetricEncryptorExceptionprotected boolean doVerify(String content, String charset, String publicKey, String sign) throws Exception
doVerify 在类中 BaseAsymmetricEncryptorExceptionpublic static PrivateKey getPrivateKeyFromPKCS8(String algorithm, InputStream ins) throws Exception
Exceptionpublic static PublicKey getPublicKeyFromX509(String algorithm, InputStream ins) throws Exception
ExceptionCopyright © 2025. All rights reserved.