mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 06:18:28 +01:00
Merge pull request #1926 from Bond-009/auth
Add clearer exceptions, warnings and docs
This commit is contained in:
@@ -60,13 +60,13 @@ namespace MediaBrowser.Common.Cryptography
|
||||
/// <value>Return the hashed password.</value>
|
||||
public byte[] Hash { get; }
|
||||
|
||||
public static PasswordHash Parse(string storageString)
|
||||
public static PasswordHash Parse(string hashString)
|
||||
{
|
||||
string[] splitted = storageString.Split('$');
|
||||
string[] splitted = hashString.Split('$');
|
||||
// The string should at least contain the hash function and the hash itself
|
||||
if (splitted.Length < 3)
|
||||
{
|
||||
throw new ArgumentException("String doesn't contain enough segments", nameof(storageString));
|
||||
throw new ArgumentException("String doesn't contain enough segments", nameof(hashString));
|
||||
}
|
||||
|
||||
// Start at 1, the first index shouldn't contain any data
|
||||
|
||||
Reference in New Issue
Block a user