CryptographyProvider.cs 471 B

123456789101112131415161718
  1. using System;
  2. using System.Security.Cryptography;
  3. using System.Text;
  4. using MediaBrowser.Model.Cryptography;
  5. namespace MediaBrowser.Common.Implementations.Cryptography
  6. {
  7. public class CryptographyProvider : ICryptographyProvider
  8. {
  9. public Guid GetMD5(string str)
  10. {
  11. using (var provider = MD5.Create())
  12. {
  13. return new Guid(provider.ComputeHash(Encoding.Unicode.GetBytes(str)));
  14. }
  15. }
  16. }
  17. }