2019-03-05 07:58:25 +00:00
|
|
|
using System;
|
|
|
|
using System.IO;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Cryptography
|
|
|
|
{
|
|
|
|
public interface ICryptoProvider
|
|
|
|
{
|
|
|
|
Guid GetMD5(string str);
|
|
|
|
byte[] ComputeMD5(Stream str);
|
|
|
|
byte[] ComputeMD5(byte[] bytes);
|
|
|
|
byte[] ComputeSHA1(byte[] bytes);
|
|
|
|
IEnumerable<string> GetSupportedHashMethods();
|
|
|
|
byte[] ComputeHash(string HashMethod, byte[] bytes);
|
|
|
|
byte[] ComputeHashWithDefaultMethod(byte[] bytes);
|
|
|
|
byte[] ComputeHash(string HashMethod, byte[] bytes, byte[] salt);
|
|
|
|
byte[] ComputeHashWithDefaultMethod(byte[] bytes, byte[] salt);
|
|
|
|
byte[] ComputeHash(PasswordHash hash);
|
2019-01-31 08:24:53 +00:00
|
|
|
byte[] GenerateSalt();
|
2019-03-05 07:58:25 +00:00
|
|
|
string DefaultHashMethod { get; }
|
|
|
|
}
|
|
|
|
}
|