aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Cryptography/PasswordHash.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2020-11-25 23:40:31 +0100
committerBond_009 <bond.009@outlook.com>2020-11-25 23:40:31 +0100
commit8c8a71692e2f42e30f95e9ff38cc5442a0d56978 (patch)
tree0ad3a0c4ea78de83d142c8446ee3d15345408fe9 /MediaBrowser.Common/Cryptography/PasswordHash.cs
parent9534f55eb077249b102e56cc0bc64e95b704cf85 (diff)
Remove Hex class as the BCL has one now
Diffstat (limited to 'MediaBrowser.Common/Cryptography/PasswordHash.cs')
-rw-r--r--MediaBrowser.Common/Cryptography/PasswordHash.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Common/Cryptography/PasswordHash.cs b/MediaBrowser.Common/Cryptography/PasswordHash.cs
index 3e12536ec..3e2eae1c8 100644
--- a/MediaBrowser.Common/Cryptography/PasswordHash.cs
+++ b/MediaBrowser.Common/Cryptography/PasswordHash.cs
@@ -101,13 +101,13 @@ namespace MediaBrowser.Common.Cryptography
// Check if the string also contains a salt
if (splitted.Length - index == 2)
{
- salt = Hex.Decode(splitted[index++]);
- hash = Hex.Decode(splitted[index++]);
+ salt = Convert.FromHexString(splitted[index++]);
+ hash = Convert.FromHexString(splitted[index++]);
}
else
{
salt = Array.Empty<byte>();
- hash = Hex.Decode(splitted[index++]);
+ hash = Convert.FromHexString(splitted[index++]);
}
return new PasswordHash(id, hash, salt, parameters);
@@ -144,11 +144,11 @@ namespace MediaBrowser.Common.Cryptography
if (_salt.Length != 0)
{
str.Append('$')
- .Append(Hex.Encode(_salt, false));
+ .Append(Convert.ToHexString(_salt));
}
return str.Append('$')
- .Append(Hex.Encode(_hash, false)).ToString();
+ .Append(Convert.ToHexString(_hash)).ToString();
}
}
}