Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

Commit 93f775d

Browse files
authored
Update SecureStorage.android.cs
1 parent d6b3c38 commit 93f775d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Xamarin.Essentials/SecureStorage/SecureStorage.android.cs

+5
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ static void PlatformRemoveAll() =>
128128

129129
internal static bool AlwaysUseAsymmetricKeyStorage { get; set; } = false;
130130

131+
// While MD5 is deemed to be not secure anymore, it is not used in a security context here.
132+
// Here we hash a key value to ensure compatibility with the underlying platform's preferences storage (so the key was a determinate length and didn't exceed platform limits).
133+
// As part as Microsofts ongoing efforts to secure the .NET ecosystem, this usage of an insecure hashing mechanism was flagged.
134+
// An exception has been requested for the usage of this "unsafe" hashing mechanism.
135+
// More details here (internal link): https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1676270
131136
internal static string Md5Hash(string input)
132137
{
133138
var hash = new StringBuilder();

0 commit comments

Comments
 (0)