parent
3967c91d1a
commit
4e42fe6bad
@ -203,7 +203,9 @@ public final class NacosSignatureAlgorithm {
|
|||||||
Mac instance = Mac.getInstance(jcaName);
|
Mac instance = Mac.getInstance(jcaName);
|
||||||
instance.init(key);
|
instance.init(key);
|
||||||
return instance;
|
return instance;
|
||||||
} catch (NoSuchAlgorithmException | InvalidKeyException e) {
|
} catch (NoSuchAlgorithmException e) {
|
||||||
|
throw new IllegalArgumentException("No Such Algorithm: " + jcaName);
|
||||||
|
} catch (InvalidKeyException e) {
|
||||||
throw new IllegalArgumentException("Invalid key: " + key);
|
throw new IllegalArgumentException("Invalid key: " + key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user