You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.309
Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
parent
ee1447783b
commit
94b2861243
@@ -1837,18 +1837,25 @@ namespace System.Workflow.Runtime
|
||||
return HashServiceType(serviceType.AssemblyQualifiedName);
|
||||
}
|
||||
|
||||
[SuppressMessage("Microsoft.Cryptographic.Standard", "CA5350:MD5CannotBeUsed",
|
||||
[SuppressMessage("Microsoft.Cryptographic.Standard", "CA5350:MD5CannotBeUsed",
|
||||
Justification = "Design has been approved. We are not using MD5 for any security or cryptography purposes but rather as a hash.")]
|
||||
internal static Guid HashServiceType(String serviceFullTypeName)
|
||||
{
|
||||
MD5 md5 = new MD5CryptoServiceProvider();
|
||||
byte[] data;
|
||||
byte[] result;
|
||||
|
||||
UnicodeEncoding ue = new UnicodeEncoding();
|
||||
data = ue.GetBytes(serviceFullTypeName);
|
||||
|
||||
result = md5.ComputeHash(data);
|
||||
if (AppSettings.FIPSRequired)
|
||||
{
|
||||
result = MD5PInvokeHelper.CalculateHash(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
MD5 md5 = new MD5CryptoServiceProvider();
|
||||
result = md5.ComputeHash(data);
|
||||
}
|
||||
|
||||
return new Guid(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user