diff --git a/src/App/App.csproj b/src/App/App.csproj
index 3c51b2ea2..ee1c50347 100644
--- a/src/App/App.csproj
+++ b/src/App/App.csproj
@@ -58,9 +58,11 @@
Platforms\iOS\Entitlements.plist
all
None
+ -gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"
false
+ -gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"
diff --git a/src/iOS.Autofill/iOS.Autofill.csproj b/src/iOS.Autofill/iOS.Autofill.csproj
index c15688df2..68e88b8bf 100644
--- a/src/iOS.Autofill/iOS.Autofill.csproj
+++ b/src/iOS.Autofill/iOS.Autofill.csproj
@@ -26,9 +26,11 @@
Entitlements.plist
all
None
+ -gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"
false
+ -gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"
diff --git a/src/iOS.Core/Services/CryptoPrimitiveService.cs b/src/iOS.Core/Services/CryptoPrimitiveService.cs
index 71989985f..f1047f00a 100644
--- a/src/iOS.Core/Services/CryptoPrimitiveService.cs
+++ b/src/iOS.Core/Services/CryptoPrimitiveService.cs
@@ -48,9 +48,8 @@ namespace Bit.iOS.Core.Services
var passwordData = NSData.FromArray(password);
var saltData = NSData.FromArray(salt);
- // TODO: [MAUI-Migration] [Critical]
- //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));
@@ -59,12 +58,11 @@ namespace Bit.iOS.Core.Services
// ref: http://opensource.apple.com/source/CommonCrypto/CommonCrypto-55010/CommonCrypto/CommonKeyDerivation.h
[DllImport(ObjCRuntime.Constants.libSystemLibrary, EntryPoint = "CCKeyDerivationPBKDF")]
- private extern static int CCKeyCerivationPBKDF(uint algorithm, IntPtr password, nuint passwordLen,
+ private static extern int CCKeyCerivationPBKDF(uint algorithm, IntPtr password, nuint passwordLen,
IntPtr salt, nuint saltLen, uint prf, nuint rounds, IntPtr derivedKey, nuint derivedKeyLength);
- // TODO: [MAUI-Migration] [Critical]
- //[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);
}
}