mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-22 10:06:40 +00:00
Remove Hex class as the BCL has one now
This commit is contained in:
@@ -647,7 +647,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
{
|
||||
using var options = new HttpRequestMessage(HttpMethod.Post, ApiUrl + "/token");
|
||||
var hashedPasswordBytes = _cryptoProvider.ComputeHash("SHA1", Encoding.ASCII.GetBytes(password), Array.Empty<byte>());
|
||||
string hashedPassword = Hex.Encode(hashedPasswordBytes);
|
||||
string hashedPassword = Convert.ToHexString(hashedPasswordBytes);
|
||||
options.Content = new StringContent("{\"username\":\"" + username + "\",\"password\":\"" + hashedPassword + "\"}", Encoding.UTF8, MediaTypeNames.Application.Json);
|
||||
|
||||
using var response = await Send(options, false, null, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace Emby.Server.Implementations.QuickConnect
|
||||
Span<byte> bytes = stackalloc byte[length];
|
||||
_rng.GetBytes(bytes);
|
||||
|
||||
return Hex.Encode(bytes);
|
||||
return Convert.ToHexString(bytes);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -414,7 +414,7 @@ namespace Emby.Server.Implementations.Updates
|
||||
using var md5 = MD5.Create();
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
var hash = Hex.Encode(md5.ComputeHash(stream));
|
||||
var hash = Convert.ToHexString(md5.ComputeHash(stream));
|
||||
if (!string.Equals(package.Checksum, hash, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
_logger.LogError(
|
||||
|
||||
Reference in New Issue
Block a user