aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/Cryptography
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-10-23 18:45:47 -0400
committerGitHub <noreply@github.com>2016-10-23 18:45:47 -0400
commit931f5f2e6a7e790dd28e3c35f6b7fd49ad00fed1 (patch)
tree9fb45a97f22c1d0c5ef4f8dbc88fec851be6792a /MediaBrowser.Common.Implementations/Cryptography
parentb9b70da03eeb324d8661f4b2fa5615091e23cc45 (diff)
parentee1c536171a9d45009fdb68bcd8b3141a3390c5e (diff)
Merge pull request #2254 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Common.Implementations/Cryptography')
-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 0000000000..81cbaa3aae
--- /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)));
+ }
+ }
+ }
+}