296 references to Name
dotnet-sourcelink (1)
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Utilities\HashAlgorithmOperations.cs (1)
14=> HashAlgorithmName.SHA256.Name;
Microsoft.CodeAnalysis (7)
Compilation\Compilation.cs (1)
3300Debug.Assert(!deterministic || moduleBeingBuilt.PdbChecksumAlgorithm.Name != null);
Compilation\DeterministicKeyBuilder.cs (1)
493writer.Write("pdbChecksumAlgorithm", options.PdbChecksumAlgorithm.Name);
Emit\EmitOptions.cs (1)
369if (PdbChecksumAlgorithm.Name != null)
NativePdbWriter\PdbWriter.cs (1)
41private bool IsDeterministic { get => _hashAlgorithmNameOpt.Name != null; }
PEWriter\PeWriter.cs (3)
205Debug.Assert(!isDeterministic || context.Module.PdbChecksumAlgorithm.Name != null); 207var portablePdbIdProvider = (context.Module.PdbChecksumAlgorithm.Name != null) ? 253debugDirectoryBuilder.AddPdbChecksumEntry(context.Module.PdbChecksumAlgorithm.Name!, portablePdbContentHash);
Microsoft.CodeAnalysis.Razor.Compiler (2)
Language\DefaultRazorCSharpLoweringPhase.cs (2)
101$"{HashAlgorithmName.SHA1.Name} {HashAlgorithmName.SHA256.Name}",
Microsoft.DotNet.Build.Tasks.Workloads (1)
Utils.cs (1)
26HashAlgorithm algorithm = HashAlgorithm.Create(hashName.Name);
System.Security.Cryptography (268)
src\runtime\src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (1)
235throw new CryptographicException(SR.Cryptography_Cms_UnknownAlgorithm, algName.Name);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECCng.HashAlgorithm.cs (3)
17if (name is null || string.IsNullOrEmpty(name.Value.Name)) 24name.Value.Name, 30throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, name.Value.Name);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanCng.cs (4)
79ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 85hashAlgorithm.Name, 100ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 110hashAlgorithm.Name,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (3)
61pbeParameters.HashAlgorithm.Name); 176Debug.Assert(digestAlgorithmName.Name != null); 329throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, prf.Name);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
101throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (2)
93IntPtr namePtr = Marshal.StringToHGlobalUni(padding.OaepHashAlgorithm.Name); 175IntPtr namePtr = Marshal.StringToHGlobalUni(padding.OaepHashAlgorithm.Name);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.SignVerify.cs (4)
32using (HashProviderCng hashProvider = new HashProviderCng(hashAlgorithm.Name!, null)) 45string? hashAlgorithmName = hashAlgorithm.Name; 86string? hashAlgorithmName = hashAlgorithm.Name; 134string? hashAlgorithmName = hashAlgorithm.Name;
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (1)
75switch (hashAlgorithmName.Name)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (17)
50/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's <see langword="null" />. 53/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's empty. 74/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's <see langword="null" />. 82/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's empty. 124/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's <see langword="null" />. 128/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's empty. 177/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's <see langword="null" />. 181/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's empty. 225/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's <see langword="null" />. 228/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's empty. 258/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's <see langword="null" />. 261/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's empty. 289/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's <see langword="null" />. 292/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's empty. 330/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's <see langword="null" />. 333/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> that's empty. 532string? hashAlgorithmName = hashAlgorithm.Name;
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdfImplementationCng.cs (3)
42Debug.Assert(_hashAlgorithm.Name is not null); 47fixed (char* pHashAlgorithm = _hashAlgorithm.Name) 60buffers[2].cbBuffer = (_hashAlgorithm.Name.Length + 1) * 2; // +1 for the null terminator.
System\Security\Cryptography\CryptographicOperations.cs (80)
116/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 121/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty. 142/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 146/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty. 157Debug.Assert(hashAlgorithm.Name is not null); 160int written = HashProviderDispenser.OneShotHashProvider.HashData(hashAlgorithm.Name, source, buffer); 175/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 178/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 211/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty. 214/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 226Debug.Assert(hashAlgorithm.Name is not null); 234bytesWritten = HashProviderDispenser.OneShotHashProvider.HashData(hashAlgorithm.Name, source, destination); 249/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 254/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 268Debug.Assert(hashAlgorithm.Name is not null); 269return LiteHashProvider.HashStream(hashAlgorithm.Name, hashSizeInBytes, source); 283/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 290/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 304Debug.Assert(hashAlgorithm.Name is not null); 307int written = LiteHashProvider.HashStream(hashAlgorithm.Name, source, destination); 326/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 333/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 354Debug.Assert(hashAlgorithm.Name is not null); 358hashAlgorithm.Name, 377/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 382/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 402Debug.Assert(hashAlgorithm.Name is not null); 404return LiteHashProvider.HashStreamAsync(hashAlgorithm.Name, source, cancellationToken); 418/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 423/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty. 446/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 450/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty. 461Debug.Assert(hashAlgorithm.Name is not null); 464int written = HashProviderDispenser.OneShotHashProvider.MacData(hashAlgorithm.Name, key, source, buffer); 480/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 483/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 521/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty. 524/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 541Debug.Assert(hashAlgorithm.Name is not null); 549bytesWritten = HashProviderDispenser.OneShotHashProvider.MacData(hashAlgorithm.Name, key, source, destination); 565/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 570/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 597/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 602/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 616Debug.Assert(hashAlgorithm.Name is not null); 618return LiteHashProvider.HmacStream(hashAlgorithm.Name, hashSizeInBytes, key, source); 633/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 638/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 654Debug.Assert(hashAlgorithm.Name is not null); 657return LiteHashProvider.HmacStream(hashAlgorithm.Name, key, source, destination); 674/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 679/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 717/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 724/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 746Debug.Assert(hashAlgorithm.Name is not null); 749return LiteHashProvider.HmacStreamAsync(hashAlgorithm.Name, key.Span, source, destination, cancellationToken); 766/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 771/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 792Debug.Assert(hashAlgorithm.Name is not null); 794return LiteHashProvider.HmacStreamAsync(hashAlgorithm.Name, key.Span, source, cancellationToken); 811/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 814/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 840Debug.Assert(hashAlgorithm.Name is not null); 847Debug.Fail($"Validated hash algorithm '{hashAlgorithm.Name}' size ({hashSizeInBytes}) exceeds stack alloc."); 851int written = HashProviderDispenser.OneShotHashProvider.MacData(hashAlgorithm.Name, key, source, macBuffer); 866/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 898/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 904/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 932Debug.Assert(hashAlgorithm.Name is not null); 939Debug.Fail($"Validated hash algorithm '{hashAlgorithm.Name}' size ({hashSizeInBytes}) exceeds stack alloc."); 943int written = LiteHashProvider.HmacStream(hashAlgorithm.Name, key, source, macBuffer); 954/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 988/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is empty.</para> 994/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 1027Debug.Assert(hashAlgorithm.Name is not null); 1029return VerifyHmacAsyncInner(hashAlgorithm.Name, key, source, hash, cancellationToken); 1057/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.Name" /> that is 1098ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 1100switch (hashAlgorithm.Name) 1134throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\DSA.cs (21)
120/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 129ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 146ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 183/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 203ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 244ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 266/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 274ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 317ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 355/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 377ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 388ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 543ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 575/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 587ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 631ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 653/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 666ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 690/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 703ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 755ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\DSACryptoServiceProvider.Windows.cs (4)
450Debug.Assert(!string.IsNullOrEmpty(hashAlgorithm.Name)); 454throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 464Debug.Assert(!string.IsNullOrEmpty(hashAlgorithm.Name)); 468throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name);
System\Security\Cryptography\ECDsa.cs (33)
60ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 97/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 117ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 196/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 204ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 227/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 235ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 468ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 495/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 507ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 549ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 568/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is an empty string. 571/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is <see langword="null" />. 581ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 602/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is an empty string. 605/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is <see langword="null" />. 613ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 641/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is an empty string. 649/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is <see langword="null" />. 661ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 691/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is an empty string. 699/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is <see langword="null" />. 709ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 737ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 775/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 797ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 825/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 834ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 843ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 872ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 919ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 942/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.Name"/>. 956ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\Helpers.cs (4)
421switch (exportParameters.HashAlgorithm.Name) 432throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name)); 437switch (exportParameters.HashAlgorithm.Name) 444throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name));
System\Security\Cryptography\HKDF.Windows.cs (2)
124Debug.Assert(hashAlgorithmName.Name is not null); 164Interop.BCrypt.BCryptSetSZProperty(keyHandle, BCRYPT_HKDF_HASH_ALGORITHM, hashAlgorithmName.Name);
System\Security\Cryptography\IncrementalHash.cs (12)
30Debug.Assert(!string.IsNullOrEmpty(name.Name)); 40Debug.Assert(!string.IsNullOrEmpty(name.Name)); 43_algorithmName = new HashAlgorithmName("HMAC" + name.Name); 381/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.Name"/> is <c>null</c>, or 387ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 388CheckSha3Support(hashAlgorithm.Name); 390return new IncrementalHash(hashAlgorithm, HashProviderDispenser.CreateHashProvider(hashAlgorithm.Name)); 411/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.Name"/> is <c>null</c>, or 440/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.Name"/> is <c>null</c>, or 446ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 447CheckSha3Support(hashAlgorithm.Name); 449return new IncrementalHash(hashAlgorithm, new HMACCommon(hashAlgorithm.Name, key, -1));
System\Security\Cryptography\Pbkdf2Implementation.Windows.cs (2)
40Debug.Assert(hashAlgorithm.Name is not null); 41string hashAlgorithmName = hashAlgorithm.Name;
System\Security\Cryptography\Rfc2898DeriveBytes.cs (2)
249if (string.IsNullOrEmpty(hashAlgorithm.Name)) 263throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\Rfc2898DeriveBytes.OneShot.cs (16)
32/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> 67/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> 104/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> 143/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> 186/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> 231/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.Name" /> 268Debug.Assert(hashAlgorithm.Name is not null); 309Debug.Assert(hashAlgorithm.Name is not null); 322string? hashAlgorithmName = hashAlgorithm.Name; 326if (hashAlgorithmName == HashAlgorithmName.SHA1.Name || 327hashAlgorithmName == HashAlgorithmName.SHA256.Name || 328hashAlgorithmName == HashAlgorithmName.SHA384.Name || 329hashAlgorithmName == HashAlgorithmName.SHA512.Name) 334if (hashAlgorithmName == HashAlgorithmName.SHA3_256.Name || 335hashAlgorithmName == HashAlgorithmName.SHA3_384.Name || 336hashAlgorithmName == HashAlgorithmName.SHA3_512.Name)
System\Security\Cryptography\RSA.cs (18)
394ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 404ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 413ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 434/// <paramref name="padding" /> or <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is <see langword="null" />. 437/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is an empty string. 458ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 487/// <paramref name="padding" /> or <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is <see langword="null" />. 491/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is an empty string. 521ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 540/// <paramref name="padding" /> or <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is <see langword="null" />. 543/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is an empty string. 564ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 589/// <paramref name="padding" /> or <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is <see langword="null" />. 593/// <paramref name="hashAlgorithm" />'s <see cref="HashAlgorithmName.Name" /> is an empty string. 623ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 658ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 669ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 678ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\RSABCrypt.cs (6)
146ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 169ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 206padding.OaepHashAlgorithm.Name, 250padding.OaepHashAlgorithm.Name); 265string? hashAlgorithmName = hashAlgorithm.Name; 325string? hashAlgorithmName = hashAlgorithm.Name;
System\Security\Cryptography\RSACryptoServiceProvider.Windows.cs (4)
553hashAlgorithm.Name switch 560_ => throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name), 638ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 654ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\RSAEncryptionPadding.cs (3)
68ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 85/// If <see cref="Mode"/> is not <see cref="RSAEncryptionPaddingMode.Oaep"/>, then <see cref="HashAlgorithmName.Name" /> will be null. 132return _mode.ToString() + _oaepHashAlgorithm.Name;
System\Security\Cryptography\SP800108HmacCounterKdfImplementationCng.cs (2)
12Debug.Assert(hashAlgorithm.Name is not null); 17int hashAlgorithmBlockSize = GetHashBlockSize(hashAlgorithm.Name);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (6)
76ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 103ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 134ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 170ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 509if (string.IsNullOrEmpty(HashAlgorithm.Name) && 1021if (string.IsNullOrEmpty(HashAlgorithm.Name) &&
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (6)
53/// <see cref="HashAlgorithmName.Name"/>. 95/// <see cref="HashAlgorithmName.Name"/> and <paramref name="issuerCertificate"/> 145ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 287/// <see cref="HashAlgorithmName.Name"/>. 297/// <see cref="HashAlgorithmName.Name"/> and <paramref name="generator"/> 343ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\X509Certificates\ECDsaX509SignatureGenerator.cs (1)
54SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\X509Certificates\RSAPkcs1X509SignatureGenerator.cs (1)
80SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\X509Certificates\RSAPssX509SignatureGenerator.cs (1)
58SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (5)
664/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.Name"/> is <see langword="null"/> or empty. 701/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.Name"/> is <see langword="null"/> or empty. 726ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 760/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.Name"/> is <see langword="null"/> or empty. 776ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System.Security.Cryptography.Cose (10)
System\Security\Cryptography\Cose\CoseKey.cs (8)
34ArgumentNullException.ThrowIfNull(hashAlgorithm.Name); 48ArgumentNullException.ThrowIfNull(hashAlgorithm.Name); 274return hashAlgorithm.Name switch 279_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm)) 285return hashAlgorithm.Name switch 290_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm)) 296return hashAlgorithm.Name switch 301_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm))
System\Security\Cryptography\Cose\CoseSigner.cs (2)
184exMsg = SR.Format(SR.Sign1SignCoseAlgorithmDoesNotMatchSpecifiedKeyHashAlgorithmAndPadding, alg.Value, CoseKey.KeyType, HashAlgorithm.Name, RSASignaturePadding); 192exMsg = SR.Format(SR.Sign1SignCoseAlgorithmDoesNotMatchSpecifiedKeyAndHashAlgorithm, alg.Value, CoseKey.KeyType, HashAlgorithm.Name);
System.Security.Cryptography.Pkcs (6)
src\runtime\src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (1)
235throw new CryptographicException(SR.Cryptography_Cms_UnknownAlgorithm, algName.Name);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (3)
61pbeParameters.HashAlgorithm.Name); 176Debug.Assert(digestAlgorithmName.Name != null); 329throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, prf.Name);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
101throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name);
System\Security\Cryptography\Pkcs\CmsSignature.RSA.cs (1)
381Debug.Assert(hashAlgorithmName == HashAlgorithmName.MD5, $"Unsupported digest algorithm '{hashAlgorithmName.Name}'");