mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix bug
This commit is contained in:
@@ -180,7 +180,7 @@ public class KeyUtil {
|
||||
*/
|
||||
public static SecretKey generateDESKey(String algorithm, byte[] key) {
|
||||
if (StrUtil.isBlank(algorithm) || false == algorithm.startsWith("DES")) {
|
||||
throw new CryptoException("Algorithm [{}] is not a DES algorithm!");
|
||||
throw new CryptoException("Algorithm [{}] is not a DES algorithm!", algorithm);
|
||||
}
|
||||
|
||||
SecretKey secretKey;
|
||||
@@ -212,7 +212,7 @@ public class KeyUtil {
|
||||
*/
|
||||
public static SecretKey generatePBEKey(String algorithm, char[] key) {
|
||||
if (StrUtil.isBlank(algorithm) || false == algorithm.startsWith("PBE")) {
|
||||
throw new CryptoException("Algorithm [{}] is not a PBE algorithm!");
|
||||
throw new CryptoException("Algorithm [{}] is not a PBE algorithm!", algorithm);
|
||||
}
|
||||
|
||||
if (null == key) {
|
||||
|
Reference in New Issue
Block a user