aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/Cryptography/CryptographyProvider.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-10-23 15:14:57 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-10-23 15:14:57 -0400
commit07791d46a571d3d6eed23e98ec0fe1c46ea0d37f (patch)
treedc34a04c700f8837c557c511edab20ce9816d82d /MediaBrowser.Common.Implementations/Cryptography/CryptographyProvider.cs
parent48296834028bdfaf782132258d87fdab42f528eb (diff)
rework scheduled tasks in preparation of common project going portable
Diffstat (limited to 'MediaBrowser.Common.Implementations/Cryptography/CryptographyProvider.cs')
-rw-r--r--MediaBrowser.Common.Implementations/Cryptography/CryptographyProvider.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/MediaBrowser.Common.Implementations/Cryptography/CryptographyProvider.cs b/MediaBrowser.Common.Implementations/Cryptography/CryptographyProvider.cs
new file mode 100644
index 000000000..81cbaa3aa
--- /dev/null
+++ b/MediaBrowser.Common.Implementations/Cryptography/CryptographyProvider.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Security.Cryptography;
+using System.Text;
+using MediaBrowser.Model.Cryptography;
+
+namespace MediaBrowser.Common.Implementations.Cryptography
+{
+ public class CryptographyProvider : ICryptographyProvider
+ {
+ public Guid GetMD5(string str)
+ {
+ using (var provider = MD5.Create())
+ {
+ return new Guid(provider.ComputeHash(Encoding.Unicode.GetBytes(str)));
+ }
+ }
+ }
+}