Add using block and HexHelper

This commit is contained in:
Bill Thornton 2019-10-02 09:51:53 -04:00
parent 119041a425
commit 80dccdef22

View File

@ -25,6 +25,7 @@ using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Services; using MediaBrowser.Model.Services;
using Microsoft.Net.Http.Headers; using Microsoft.Net.Http.Headers;
using static MediaBrowser.Common.HexHelper;
namespace MediaBrowser.Api.LiveTv namespace MediaBrowser.Api.LiveTv
{ {
@ -886,10 +887,10 @@ namespace MediaBrowser.Api.LiveTv
{ {
// SchedulesDirect requires a SHA1 hash of the user's password // SchedulesDirect requires a SHA1 hash of the user's password
// https://github.com/SchedulesDirect/JSON-Service/wiki/API-20141201#obtain-a-token // https://github.com/SchedulesDirect/JSON-Service/wiki/API-20141201#obtain-a-token
SHA1 sha = SHA1.Create(); using (SHA1 sha = SHA1.Create()) {
return BitConverter.ToString( return ToHexString(
sha.ComputeHash(Encoding.UTF8.GetBytes(str))) sha.ComputeHash(Encoding.UTF8.GetBytes(str)));
.Replace("-", string.Empty).ToLowerInvariant(); }
} }
public void Delete(DeleteListingProvider request) public void Delete(DeleteListingProvider request)