Explorar o código

Fix typo in comparision

Neeraj Gupta %!s(int64=2) %!d(string=hai) anos
pai
achega
37abdca05d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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 memLimit = Sodium.cryptoPwhashMemlimitSensitive;
     int opsLimit = Sodium.cryptoPwhashOpslimitSensitive;
     int opsLimit = Sodium.cryptoPwhashOpslimitSensitive;
     Uint8List key;
     Uint8List key;
-    while (memLimit > Sodium.cryptoPwhashMemlimitMin &&
-        opsLimit < Sodium.cryptoPwhashOpslimitMax) {
+    while (memLimit >= Sodium.cryptoPwhashMemlimitMin &&
+        opsLimit <= Sodium.cryptoPwhashOpslimitMax) {
       try {
       try {
         key = await deriveKey(password, salt, memLimit, opsLimit);
         key = await deriveKey(password, salt, memLimit, opsLimit);
         return DerivedKeyResult(key, memLimit, opsLimit);
         return DerivedKeyResult(key, memLimit, opsLimit);