aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Cryptography/ICryptoProvider.cs
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2022-01-07 10:23:22 +0100
committercvium <clausvium@gmail.com>2022-01-07 10:23:22 +0100
commitc658a883a2bc84b46ed73d209d2983e8a324cdce (patch)
treedabdbb5ac224e202d5433e7062e0c1b6872d1af7 /MediaBrowser.Model/Cryptography/ICryptoProvider.cs
parent2899b77cd58456470b8dd4d01d3a8c525a9b5911 (diff)
parent6b4f5a86631e5bde93dae88553380c7ffd99b8e4 (diff)
Merge branch 'master' into keyframe_extraction_v1
# Conflicts: # Jellyfin.Api/Controllers/DynamicHlsController.cs # MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs # MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
Diffstat (limited to 'MediaBrowser.Model/Cryptography/ICryptoProvider.cs')
-rw-r--r--MediaBrowser.Model/Cryptography/ICryptoProvider.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/MediaBrowser.Model/Cryptography/ICryptoProvider.cs b/MediaBrowser.Model/Cryptography/ICryptoProvider.cs
index d8b7d848a..6c521578c 100644
--- a/MediaBrowser.Model/Cryptography/ICryptoProvider.cs
+++ b/MediaBrowser.Model/Cryptography/ICryptoProvider.cs
@@ -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();