Browse Source

Fix typo in comparision

Neeraj Gupta 2 năm trước cách đây
mục cha
commit
37abdca05d
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      lib/utils/crypto_util.dart

+ 2 - 2
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);