diff options
| author | Aizistral | 2022-10-24 16:01:49 +0200 |
|---|---|---|
| committer | Aizistral | 2022-10-24 16:02:01 +0200 |
| commit | 8b7cb26b70761d607dad3baa240be7b91c67e265 (patch) | |
| tree | d07531eb0f8823f928b41f4f33180887d914659f /src/main | |
| parent | 3a946f7d81efece5a2976fa0ac0720b6ca01bcb8 (diff) | |
Add fail-safe handling for unrecognized algorithms
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/java/com/aizistral/nochatreports/config/NCRConfigEncryption.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/aizistral/nochatreports/config/NCRConfigEncryption.java b/src/main/java/com/aizistral/nochatreports/config/NCRConfigEncryption.java index ec552b2..9cf7671 100644 --- a/src/main/java/com/aizistral/nochatreports/config/NCRConfigEncryption.java +++ b/src/main/java/com/aizistral/nochatreports/config/NCRConfigEncryption.java @@ -39,7 +39,7 @@ public class NCRConfigEncryption extends JSONConfig { @Override protected void uponLoad() { this.algorithm = Encryption.getRegistered().stream().filter(e -> e.getName().equals(this.algorithmName)) - .findFirst().orElseThrow(() -> new RuntimeException("Invalid encryption algorithm specified in " + FILE_NAME + ": " + this.algorithmName)); + .findFirst().orElse(Encryption.AES_CFB8); this.validate(); } |
