Skip to content

Commit 03c2dfd

Browse files
WPF: Use SHA1 one-shots (#3318)
1 parent 4ecd78e commit 03c2dfd

File tree

1 file changed

+1
-5
lines changed
  • src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT

1 file changed

+1
-5
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/WindowsRuntime/Generated/WinRT/GuidGenerator.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,7 @@ public static Guid CreateIID(Type type)
136136
return new Guid(sig);
137137
}
138138
var data = wrt_pinterface_namespace.ToByteArray().Concat(UTF8Encoding.UTF8.GetBytes(sig)).ToArray();
139-
using (SHA1 sha = new SHA1CryptoServiceProvider())
140-
{
141-
var hash = sha.ComputeHash(data);
142-
return encode_guid(hash);
143-
}
139+
return encode_guid(SHA1.HashData(data));
144140
}
145141
}
146142
}

0 commit comments

Comments
 (0)