mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
[mob] Remove client side strength check
This commit is contained in:
parent
43adef8899
commit
02fb6888ab
@ -17,8 +17,6 @@ const int loginSubKeyLen = 32;
|
||||
const int loginSubKeyId = 1;
|
||||
const String loginSubKeyContext = "loginctx";
|
||||
|
||||
const int _keyDerivationStregth = 1073741824 * 4;
|
||||
|
||||
Uint8List cryptoSecretboxEasy(Map<String, dynamic> args) {
|
||||
return Sodium.cryptoSecretboxEasy(args["source"], args["nonce"], args["key"]);
|
||||
}
|
||||
@ -408,10 +406,9 @@ class CryptoUtil {
|
||||
final factor = Sodium.cryptoPwhashMemlimitSensitive ~/
|
||||
Sodium.cryptoPwhashMemlimitModerate; // = 4
|
||||
int opsLimit = Sodium.cryptoPwhashOpslimitSensitive * factor; // = 16
|
||||
if (memLimit * opsLimit != desiredStrength ||
|
||||
desiredStrength != _keyDerivationStregth) {
|
||||
if (memLimit * opsLimit != desiredStrength) {
|
||||
throw UnsupportedError(
|
||||
"unexpcted values for memLimit $memLimit and opsLimit: $opsLimit or desiredStrength: $desiredStrength",
|
||||
"unexpcted values for memLimit $memLimit and opsLimit: $opsLimit",
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user