diff options
| author | Bill Thornton <billt2006@gmail.com> | 2019-10-02 09:51:53 -0400 |
|---|---|---|
| committer | Bill Thornton <billt2006@gmail.com> | 2019-10-02 09:51:53 -0400 |
| commit | 80dccdef22dfebd1f411b779f30b5fea89e10486 (patch) | |
| tree | a67887d4473f0241818834b2034ea8e9cde95257 | |
| parent | 119041a425b270a7747a0e663d1212d64581542b (diff) | |
Add using block and HexHelper
| -rw-r--r-- | MediaBrowser.Api/LiveTv/LiveTvService.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs index 07f922393..b05e8c949 100644 --- a/MediaBrowser.Api/LiveTv/LiveTvService.cs +++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs @@ -25,6 +25,7 @@ using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Querying; using MediaBrowser.Model.Services; using Microsoft.Net.Http.Headers; +using static MediaBrowser.Common.HexHelper; namespace MediaBrowser.Api.LiveTv { @@ -886,10 +887,10 @@ namespace MediaBrowser.Api.LiveTv { // SchedulesDirect requires a SHA1 hash of the user's password // https://github.com/SchedulesDirect/JSON-Service/wiki/API-20141201#obtain-a-token - SHA1 sha = SHA1.Create(); - return BitConverter.ToString( - sha.ComputeHash(Encoding.UTF8.GetBytes(str))) - .Replace("-", string.Empty).ToLowerInvariant(); + using (SHA1 sha = SHA1.Create()) { + return ToHexString( + sha.ComputeHash(Encoding.UTF8.GetBytes(str))); + } } public void Delete(DeleteListingProvider request) |
