mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-15 10:25:20 +01:00
PM-3350 Go back to include argon2id and interpreter
This commit is contained in:
parent
d2965e6e10
commit
5f43681fb1
@ -40,9 +40,9 @@
|
||||
<CodesignProvision>$(ReleaseCodesignProvision)</CodesignProvision>
|
||||
<CodesignKey>$(ReleaseCodesignKey)</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<UseInterpreter>true</UseInterpreter>
|
||||
<MtouchExtraArgs>-gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<!-- <UseInterpreter>true</UseInterpreter>
|
||||
<MtouchExtraArgs>-gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"</MtouchExtraArgs> -->
|
||||
<ItemGroup>
|
||||
<TrimmerRootAssembly Include="System.Security.Cryptography" />
|
||||
</ItemGroup>
|
||||
|
@ -47,9 +47,8 @@ namespace Bit.iOS.Core.Services
|
||||
var passwordData = NSData.FromArray(password);
|
||||
var saltData = NSData.FromArray(salt);
|
||||
|
||||
// TODO: Uncomment (Testing if without loading argon2id we can disable UseInterpreter)
|
||||
//argon2id_hash_raw(iterations, memory, parallelism, passwordData.Bytes, passwordData.Length,
|
||||
// saltData.Bytes, saltData.Length, keyData.MutableBytes, keyData.Length);
|
||||
argon2id_hash_raw(iterations, memory, parallelism, passwordData.Bytes, passwordData.Length,
|
||||
saltData.Bytes, saltData.Length, keyData.MutableBytes, keyData.Length);
|
||||
|
||||
var keyBytes = new byte[keyData.Length];
|
||||
Marshal.Copy(keyData.Bytes, keyBytes, 0, Convert.ToInt32(keyData.Length));
|
||||
@ -61,9 +60,8 @@ namespace Bit.iOS.Core.Services
|
||||
private static extern int CCKeyCerivationPBKDF(uint algorithm, IntPtr password, nuint passwordLen,
|
||||
IntPtr salt, nuint saltLen, uint prf, nuint rounds, IntPtr derivedKey, nuint derivedKeyLength);
|
||||
|
||||
// TODO: Uncomment (Testing if without loading argon2id we can disable UseInterpreter)
|
||||
//[DllImport("__Internal", EntryPoint = "argon2id_hash_raw")]
|
||||
//private static extern int argon2id_hash_raw(int timeCost, int memoryCost, int parallelism, IntPtr pwd,
|
||||
// nuint pwdlen, IntPtr salt, nuint saltlen, IntPtr hash, nuint hashlen);
|
||||
[DllImport("__Internal", EntryPoint = "argon2id_hash_raw")]
|
||||
private static extern int argon2id_hash_raw(int timeCost, int memoryCost, int parallelism, IntPtr pwd,
|
||||
nuint pwdlen, IntPtr salt, nuint saltlen, IntPtr hash, nuint hashlen);
|
||||
}
|
||||
}
|
||||
|
@ -35,9 +35,9 @@
|
||||
<CodesignProvision>$(ReleaseCodesignProvision)</CodesignProvision>
|
||||
<CodesignKey>$(ReleaseCodesignKey)</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<UseInterpreter>true</UseInterpreter>
|
||||
<MtouchExtraArgs>-gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<!-- <UseInterpreter>true</UseInterpreter>
|
||||
<MtouchExtraArgs>-gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"</MtouchExtraArgs> -->
|
||||
<ItemGroup>
|
||||
<TrimmerRootAssembly Include="System.Security.Cryptography" />
|
||||
</ItemGroup>
|
||||
|
@ -37,9 +37,9 @@
|
||||
<CodesignProvision>$(ReleaseCodesignProvision)</CodesignProvision>
|
||||
<CodesignKey>$(ReleaseCodesignKey)</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<UseInterpreter>true</UseInterpreter>
|
||||
<MtouchExtraArgs>-gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<!-- <UseInterpreter>true</UseInterpreter>
|
||||
<MtouchExtraArgs>-gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"</MtouchExtraArgs> -->
|
||||
<ItemGroup>
|
||||
<TrimmerRootAssembly Include="System.Security.Cryptography" />
|
||||
</ItemGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user