diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-06-01 17:06:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-01 17:06:01 +0200 |
| commit | ce1fa42f9d39add8467bfed186730c4a9545344d (patch) | |
| tree | 8c2aafa3a3552174d15208551da1c34449a13b18 /MediaBrowser.Common/Extensions/BaseExtensions.cs | |
| parent | 2696ac5eacfb4702d629bc06a8b42b868c316116 (diff) | |
| parent | b1f764984f7098ee1164efee77f1bcb3de9fd08a (diff) | |
Merge branch 'master' into tasks
Diffstat (limited to 'MediaBrowser.Common/Extensions/BaseExtensions.cs')
| -rw-r--r-- | MediaBrowser.Common/Extensions/BaseExtensions.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/MediaBrowser.Common/Extensions/BaseExtensions.cs b/MediaBrowser.Common/Extensions/BaseExtensions.cs index db0514bb1..40c16b957 100644 --- a/MediaBrowser.Common/Extensions/BaseExtensions.cs +++ b/MediaBrowser.Common/Extensions/BaseExtensions.cs @@ -1,6 +1,7 @@ using System; +using System.Text; using System.Text.RegularExpressions; -using MediaBrowser.Model.Cryptography; +using System.Security.Cryptography; namespace MediaBrowser.Common.Extensions { @@ -9,8 +10,6 @@ namespace MediaBrowser.Common.Extensions /// </summary> public static class BaseExtensions { - public static ICryptoProvider CryptographyProvider { get; set; } - /// <summary> /// Strips the HTML. /// </summary> @@ -31,7 +30,10 @@ namespace MediaBrowser.Common.Extensions /// <returns>Guid.</returns> public static Guid GetMD5(this string str) { - return CryptographyProvider.GetMD5(str); + using (var provider = MD5.Create()) + { + return new Guid(provider.ComputeHash(Encoding.Unicode.GetBytes(str))); + } } } } |
