mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 06:18:28 +01:00
Replace PBKDF2-SHA1 with PBKDF2-SHA512
This also migrates already created passwords on login Source for the number of iterations: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Cryptography
|
||||
{
|
||||
@@ -8,11 +8,14 @@ namespace MediaBrowser.Model.Cryptography
|
||||
{
|
||||
string DefaultHashMethod { get; }
|
||||
|
||||
IEnumerable<string> GetSupportedHashMethods();
|
||||
/// <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);
|
||||
|
||||
byte[] ComputeHash(string hashMethod, byte[] bytes, byte[] salt);
|
||||
|
||||
byte[] ComputeHashWithDefaultMethod(byte[] bytes, byte[] salt);
|
||||
bool Verify(PasswordHash hash, ReadOnlySpan<char> password);
|
||||
|
||||
byte[] GenerateSalt();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user