Fix nullability errors in Emby.Server.Implementations

This commit is contained in:
crobibero
2020-11-13 09:41:18 -07:00
parent d5e2369dd6
commit 7bf320922c
3 changed files with 19 additions and 3 deletions

View File

@@ -81,6 +81,11 @@ namespace Emby.Server.Implementations.Cryptography
}
using var h = HashAlgorithm.Create(hashMethod);
if (h == null)
{
throw new NullReferenceException(nameof(h));
}
if (salt.Length == 0)
{
return h.ComputeHash(bytes);