Merge pull request #7575 from Bond-009/md5

This commit is contained in:
Cody Robibero 2022-04-12 13:40:15 -06:00 committed by GitHub
commit c7fd7a29f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,11 +31,7 @@ namespace MediaBrowser.Common.Extensions
public static Guid GetMD5(this string str)
{
#pragma warning disable CA5351
using (var provider = MD5.Create())
{
return new Guid(provider.ComputeHash(Encoding.Unicode.GetBytes(str)));
}
return new Guid(MD5.HashData(Encoding.Unicode.GetBytes(str)));
#pragma warning restore CA5351
}
}