ICryptoProvider.cs 757 B

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