瀏覽代碼

Fix typo in comparision

Neeraj Gupta 2 年之前
父節點
當前提交
37abdca05d
共有 1 個文件被更改,包括 2 次插入2 次删除
  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);