aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Extensions/BaseExtensions.cs
diff options
context:
space:
mode:
authorAnthony Lavado <anthonylavado@users.noreply.github.com>2019-03-27 09:53:45 -0400
committerGitHub <noreply@github.com>2019-03-27 09:53:45 -0400
commit524357bfa845e1c01ef280b1d0fc3896b7b9dbaa (patch)
treef5a194260683b1469f6d7ed1e9af644af2756c99 /MediaBrowser.Common/Extensions/BaseExtensions.cs
parent31607fbb377c826415dc0f6689ac4189b38c840f (diff)
parent7343e07fe587b4817f5e80b68359d3193674e6ab (diff)
Merge pull request #1157 from Bond-009/smallfix
Simplify/remove/clean code
Diffstat (limited to 'MediaBrowser.Common/Extensions/BaseExtensions.cs')
-rw-r--r--MediaBrowser.Common/Extensions/BaseExtensions.cs10
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)));
+ }
}
}
}