mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-21 02:25:56 +08:00
修改如下:
1.去掉无用的抛出异常
This commit is contained in:
parent
79d90d0d73
commit
8320608cb9
@ -10,7 +10,7 @@ import com.ruoyi.common.encrypt.IEncryptor;
|
||||
* @date 2023-01-17 16:52
|
||||
*/
|
||||
public abstract class AbstractEncryptor implements IEncryptor {
|
||||
public AbstractEncryptor(EncryptContext context) throws Exception{
|
||||
public AbstractEncryptor(EncryptContext context) {
|
||||
//子类必须实现带参数的构造方法
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ public class AesEncryptor extends AbstractEncryptor {
|
||||
|
||||
private AES aes = null;
|
||||
|
||||
public AesEncryptor(EncryptContext context) throws Exception{
|
||||
public AesEncryptor(EncryptContext context) {
|
||||
super(context);
|
||||
String password = context.getPassword();
|
||||
if (StrUtil.isBlank(password)) {
|
||||
|
||||
@ -13,7 +13,7 @@ import com.ruoyi.common.enums.EncodeType;
|
||||
*/
|
||||
public class Base64Encryptor extends AbstractEncryptor {
|
||||
|
||||
public Base64Encryptor(EncryptContext context) throws Exception {
|
||||
public Base64Encryptor(EncryptContext context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ public class RsaEncryptor extends AbstractEncryptor {
|
||||
|
||||
private RSA rsa = null;
|
||||
|
||||
public RsaEncryptor(EncryptContext context) throws Exception {
|
||||
public RsaEncryptor(EncryptContext context) {
|
||||
super(context);
|
||||
String privateKey = context.getPrivateKey();
|
||||
String publicKey = context.getPublicKey();
|
||||
|
||||
@ -21,7 +21,7 @@ public class Sm2Encryptor extends AbstractEncryptor {
|
||||
|
||||
private SM2 sm2 = null;
|
||||
|
||||
public Sm2Encryptor(EncryptContext context) throws Exception {
|
||||
public Sm2Encryptor(EncryptContext context) {
|
||||
super(context);
|
||||
String privateKey = context.getPrivateKey();
|
||||
String publicKey = context.getPublicKey();
|
||||
|
||||
@ -20,7 +20,7 @@ public class Sm4Encryptor extends AbstractEncryptor {
|
||||
|
||||
private SM4 sm4 = null;
|
||||
|
||||
public Sm4Encryptor(EncryptContext context) throws Exception {
|
||||
public Sm4Encryptor(EncryptContext context) {
|
||||
super(context);
|
||||
String password = context.getPassword();
|
||||
if (StrUtil.isBlank(password)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user