1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 17:23:18 +00:00

PM-3349 PM-3350 Enabled argon2id and fixed one issue with the Uris when getting the icon image

This commit is contained in:
Federico Maccaroni
2023-12-14 17:32:43 -03:00
parent 8fc1e9a3b9
commit 741214a1cc
3 changed files with 13 additions and 14 deletions

View File

@@ -41,13 +41,13 @@ namespace Bit.Droid.Services
JavaSystem.LoadLibrary("argon2");
int keySize = 32;
var key = new byte[keySize];
//argon2id_hash_raw(iterations, memory, parallelism,
// password, password.Length, salt, salt.Length, key, key.Length);
argon2id_hash_raw(iterations, memory, parallelism,
password, password.Length, salt, salt.Length, key, key.Length);
return key;
}
//[DllImport("argon2", EntryPoint = "argon2id_hash_raw")]
//private static extern int argon2id_hash_raw(int timeCost, int memoryCost, int parallelism,
// byte[] pwd, int pwdlen, byte[] salt, int saltlen, byte[] hash, int hashlen);
[DllImport("argon2", EntryPoint = "argon2id_hash_raw")]
private static extern int argon2id_hash_raw(int timeCost, int memoryCost, int parallelism,
byte[] pwd, int pwdlen, byte[] salt, int saltlen, byte[] hash, int hashlen);
}
}