Log mem and ops limit on failure

This commit is contained in:
Neeraj Gupta 2023-02-05 01:38:16 +05:30
parent 37abdca05d
commit ce4942c0db
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -296,7 +296,11 @@ class CryptoUtil {
key = await deriveKey(password, salt, memLimit, opsLimit);
return DerivedKeyResult(key, memLimit, opsLimit);
} catch (e, s) {
logger.severe(e, s);
logger.severe(
"failed to derive memLimit: $memLimit and opsLimit: $opsLimit",
e,
s,
);
}
memLimit = (memLimit / 2).round();
opsLimit = opsLimit * 2;