ICryptoProvider.cs 1.0 KB

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.IO;
  3. using System.Collections.Generic;
  4. namespace MediaBrowser.Model.Cryptography
  5. {
  6. public interface ICryptoProvider
  7. {
  8. string DefaultHashMethod { get; }
  9. [Obsolete("Use System.Security.Cryptography.MD5 directly")]
  10. Guid GetMD5(string str);
  11. [Obsolete("Use System.Security.Cryptography.MD5 directly")]
  12. byte[] ComputeMD5(Stream str);
  13. [Obsolete("Use System.Security.Cryptography.MD5 directly")]
  14. byte[] ComputeMD5(byte[] bytes);
  15. [Obsolete("Use System.Security.Cryptography.SHA1 directly")]
  16. byte[] ComputeSHA1(byte[] bytes);
  17. IEnumerable<string> GetSupportedHashMethods();
  18. byte[] ComputeHash(string HashMethod, byte[] bytes);
  19. byte[] ComputeHashWithDefaultMethod(byte[] bytes);
  20. byte[] ComputeHash(string HashMethod, byte[] bytes, byte[] salt);
  21. byte[] ComputeHashWithDefaultMethod(byte[] bytes, byte[] salt);
  22. byte[] ComputeHash(PasswordHash hash);
  23. byte[] GenerateSalt();
  24. }
  25. }