diff --git a/lib/utils/crypto_util.dart b/lib/utils/crypto_util.dart index 36a5d71611c15331a035f5259448b213997d7a4f..52f0a05320f3035485b5af172b9ce1d4f6af8130 100644 --- a/lib/utils/crypto_util.dart +++ b/lib/utils/crypto_util.dart @@ -290,8 +290,8 @@ class CryptoUtil { int memLimit = Sodium.cryptoPwhashMemlimitSensitive; int opsLimit = Sodium.cryptoPwhashOpslimitSensitive; Uint8List key; - while (memLimit > Sodium.cryptoPwhashMemlimitMin && - opsLimit < Sodium.cryptoPwhashOpslimitMax) { + while (memLimit >= Sodium.cryptoPwhashMemlimitMin && + opsLimit <= Sodium.cryptoPwhashOpslimitMax) { try { key = await deriveKey(password, salt, memLimit, opsLimit); return DerivedKeyResult(key, memLimit, opsLimit);