From b366dc2e6e5be2b93f2b6fcc4549a32b655c3806 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Thu, 13 Oct 2022 19:08:00 +0200 Subject: Use ArgumentException.ThrowIfNullOrEmpty --- MediaBrowser.Model/Cryptography/PasswordHash.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'MediaBrowser.Model/Cryptography/PasswordHash.cs') diff --git a/MediaBrowser.Model/Cryptography/PasswordHash.cs b/MediaBrowser.Model/Cryptography/PasswordHash.cs index 32a34d23c1..80a30684ab 100644 --- a/MediaBrowser.Model/Cryptography/PasswordHash.cs +++ b/MediaBrowser.Model/Cryptography/PasswordHash.cs @@ -29,12 +29,7 @@ namespace MediaBrowser.Model.Cryptography public PasswordHash(string id, byte[] hash, byte[] salt, Dictionary parameters) { - ArgumentNullException.ThrowIfNull(id); - - if (id.Length == 0) - { - throw new ArgumentException("String can't be empty", nameof(id)); - } + ArgumentException.ThrowIfNullOrEmpty(id); Id = id; _hash = hash; -- cgit v1.2.3