summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAizistral2022-10-24 16:01:49 +0200
committerAizistral2022-10-24 16:02:01 +0200
commit8b7cb26b70761d607dad3baa240be7b91c67e265 (patch)
treed07531eb0f8823f928b41f4f33180887d914659f
parent3a946f7d81efece5a2976fa0ac0720b6ca01bcb8 (diff)
Add fail-safe handling for unrecognized algorithms
-rw-r--r--src/main/java/com/aizistral/nochatreports/config/NCRConfigEncryption.java2
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();
}