mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-30 05:46:30 +01:00
Add clearer exceptions, warnings and docs
This commit is contained in:
@@ -61,13 +61,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