blob: 6c521578c5f6d914524cff367ab25e527e3edb63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma warning disable CS1591
using System;
namespace MediaBrowser.Model.Cryptography
{
public interface ICryptoProvider
{
string DefaultHashMethod { get; }
/// <summary>
/// Creates a new <see cref="PasswordHash" /> instance.
/// </summary>
/// <param name="password">The password that will be hashed.</param>
/// <returns>A <see cref="PasswordHash" /> instance with the hash method, hash, salt and number of iterations.</returns>
PasswordHash CreatePasswordHash(ReadOnlySpan<char> password);
bool Verify(PasswordHash hash, ReadOnlySpan<char> password);
byte[] GenerateSalt();
byte[] GenerateSalt(int length);
}
}
|