jellyfin/MediaBrowser.Model/Cryptography/ICryptoProvider.cs

25 lines
714 B
C#
Raw Normal View History

2020-02-03 19:49:27 -05:00
#pragma warning disable CS1591
using System;
2019-03-05 02:58:25 -05:00
namespace MediaBrowser.Model.Cryptography
{
public interface ICryptoProvider
{
2019-05-21 13:28:34 -04:00
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);
2019-03-05 02:58:25 -05:00
}
}