2019-03-05 00:58:25 -07:00
|
|
|
using System;
|
|
|
|
using System.IO;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Cryptography
|
|
|
|
{
|
|
|
|
public interface ICryptoProvider
|
|
|
|
{
|
2019-05-21 10:28:34 -07:00
|
|
|
string DefaultHashMethod { get; }
|
|
|
|
[Obsolete("Use System.Security.Cryptography.MD5 directly")]
|
2019-03-05 00:58:25 -07:00
|
|
|
Guid GetMD5(string str);
|
2019-05-21 10:28:34 -07:00
|
|
|
[Obsolete("Use System.Security.Cryptography.MD5 directly")]
|
2019-03-05 00:58:25 -07:00
|
|
|
byte[] ComputeMD5(Stream str);
|
2019-05-21 10:28:34 -07:00
|
|
|
[Obsolete("Use System.Security.Cryptography.MD5 directly")]
|
2019-03-05 00:58:25 -07:00
|
|
|
byte[] ComputeMD5(byte[] bytes);
|
2019-05-21 10:28:34 -07:00
|
|
|
[Obsolete("Use System.Security.Cryptography.SHA1 directly")]
|
2019-03-05 00:58:25 -07:00
|
|
|
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 01:24:53 -07:00
|
|
|
byte[] GenerateSalt();
|
2019-03-05 00:58:25 -07:00
|
|
|
}
|
|
|
|
}
|