aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Cryptography
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Cryptography')
-rw-r--r--Emby.Server.Implementations/Cryptography/CryptographyProvider.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs b/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs
index fd302d1365..a48b6f3563 100644
--- a/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs
+++ b/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs
@@ -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);