296 references to Name
dotnet-sourcelink (1)
Program.cs (1)
358
WriteOutputLine($"'{name}' {ToHex(hash)} {HashAlgorithmGuids.TryGetName(hashAlgorithm)?.
Name
?? hashAlgorithm.ToString()} {LanguageGuids.GetName(language)}");
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Utilities\HashAlgorithmOperations.cs (1)
14
=> HashAlgorithmName.SHA256.
Name
;
Microsoft.CodeAnalysis (7)
Compilation\Compilation.cs (1)
3300
Debug.Assert(!deterministic || moduleBeingBuilt.PdbChecksumAlgorithm.
Name
!= null);
Compilation\DeterministicKeyBuilder.cs (1)
493
writer.Write("pdbChecksumAlgorithm", options.PdbChecksumAlgorithm.
Name
);
Emit\EmitOptions.cs (1)
369
if (PdbChecksumAlgorithm.
Name
!= null)
NativePdbWriter\PdbWriter.cs (1)
41
private bool IsDeterministic { get => _hashAlgorithmNameOpt.
Name
!= null; }
PEWriter\PeWriter.cs (3)
205
Debug.Assert(!isDeterministic || context.Module.PdbChecksumAlgorithm.
Name
!= null);
207
var portablePdbIdProvider = (context.Module.PdbChecksumAlgorithm.
Name
!= null) ?
253
debugDirectoryBuilder.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)
26
HashAlgorithm algorithm = HashAlgorithm.Create(hashName.
Name
);
System.Security.Cryptography (268)
src\runtime\src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (1)
235
throw new CryptographicException(SR.Cryptography_Cms_UnknownAlgorithm, algName.
Name
);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECCng.HashAlgorithm.cs (3)
17
if (name is null || string.IsNullOrEmpty(name.Value.
Name
))
24
name.Value.
Name
,
30
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, name.Value.
Name
);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanCng.cs (4)
79
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
85
hashAlgorithm.
Name
,
100
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
110
hashAlgorithm.
Name
,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (3)
61
pbeParameters.HashAlgorithm.
Name
);
176
Debug.Assert(digestAlgorithmName.
Name
!= null);
329
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, prf.
Name
);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
101
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (2)
93
IntPtr namePtr = Marshal.StringToHGlobalUni(padding.OaepHashAlgorithm.
Name
);
175
IntPtr namePtr = Marshal.StringToHGlobalUni(padding.OaepHashAlgorithm.
Name
);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.SignVerify.cs (4)
32
using (HashProviderCng hashProvider = new HashProviderCng(hashAlgorithm.
Name
!, null))
45
string? hashAlgorithmName = hashAlgorithm.
Name
;
86
string? hashAlgorithmName = hashAlgorithm.
Name
;
134
string? hashAlgorithmName = hashAlgorithm.
Name
;
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (1)
75
switch (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.
532
string? hashAlgorithmName = hashAlgorithm.
Name
;
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdfImplementationCng.cs (3)
42
Debug.Assert(_hashAlgorithm.
Name
is not null);
47
fixed (char* pHashAlgorithm = _hashAlgorithm.
Name
)
60
buffers[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.
157
Debug.Assert(hashAlgorithm.
Name
is not null);
160
int 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
226
Debug.Assert(hashAlgorithm.
Name
is not null);
234
bytesWritten = 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>
268
Debug.Assert(hashAlgorithm.
Name
is not null);
269
return 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>
304
Debug.Assert(hashAlgorithm.
Name
is not null);
307
int 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>
354
Debug.Assert(hashAlgorithm.
Name
is not null);
358
hashAlgorithm.
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>
402
Debug.Assert(hashAlgorithm.
Name
is not null);
404
return 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.
461
Debug.Assert(hashAlgorithm.
Name
is not null);
464
int 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
541
Debug.Assert(hashAlgorithm.
Name
is not null);
549
bytesWritten = 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>
616
Debug.Assert(hashAlgorithm.
Name
is not null);
618
return 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>
654
Debug.Assert(hashAlgorithm.
Name
is not null);
657
return 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>
746
Debug.Assert(hashAlgorithm.
Name
is not null);
749
return 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>
792
Debug.Assert(hashAlgorithm.
Name
is not null);
794
return 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
840
Debug.Assert(hashAlgorithm.
Name
is not null);
847
Debug.Fail($"Validated hash algorithm '{hashAlgorithm.
Name
}' size ({hashSizeInBytes}) exceeds stack alloc.");
851
int 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
932
Debug.Assert(hashAlgorithm.
Name
is not null);
939
Debug.Fail($"Validated hash algorithm '{hashAlgorithm.
Name
}' size ({hashSizeInBytes}) exceeds stack alloc.");
943
int 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
1027
Debug.Assert(hashAlgorithm.
Name
is not null);
1029
return VerifyHmacAsyncInner(hashAlgorithm.
Name
, key, source, hash, cancellationToken);
1057
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
1098
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
1100
switch (hashAlgorithm.
Name
)
1134
throw 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
"/>.
129
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
146
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
183
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
203
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
244
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
266
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
274
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
317
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
355
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
377
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
388
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
543
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
575
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
587
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
631
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
653
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
666
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
690
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
703
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
755
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
System\Security\Cryptography\DSACryptoServiceProvider.Windows.cs (4)
450
Debug.Assert(!string.IsNullOrEmpty(hashAlgorithm.
Name
));
454
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
464
Debug.Assert(!string.IsNullOrEmpty(hashAlgorithm.
Name
));
468
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
System\Security\Cryptography\ECDsa.cs (33)
60
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
97
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
117
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
196
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
204
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
227
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
235
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
468
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
495
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
507
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
549
ArgumentException.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" />.
581
ArgumentException.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" />.
613
ArgumentException.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" />.
661
ArgumentException.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" />.
709
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
737
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
775
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
797
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
825
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
834
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
843
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
872
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
919
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
942
/// <paramref name="hashAlgorithm"/> has a <see langword="null"/> or empty <see cref="HashAlgorithmName.
Name
"/>.
956
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
System\Security\Cryptography\Helpers.cs (4)
421
switch (exportParameters.HashAlgorithm.
Name
)
432
throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.
Name
));
437
switch (exportParameters.HashAlgorithm.
Name
)
444
throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.
Name
));
System\Security\Cryptography\HKDF.Windows.cs (2)
124
Debug.Assert(hashAlgorithmName.
Name
is not null);
164
Interop.BCrypt.BCryptSetSZProperty(keyHandle, BCRYPT_HKDF_HASH_ALGORITHM, hashAlgorithmName.
Name
);
System\Security\Cryptography\IncrementalHash.cs (12)
30
Debug.Assert(!string.IsNullOrEmpty(name.
Name
));
40
Debug.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
387
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
388
CheckSha3Support(hashAlgorithm.
Name
);
390
return 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
446
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
447
CheckSha3Support(hashAlgorithm.
Name
);
449
return new IncrementalHash(hashAlgorithm, new HMACCommon(hashAlgorithm.
Name
, key, -1));
System\Security\Cryptography\Pbkdf2Implementation.Windows.cs (2)
40
Debug.Assert(hashAlgorithm.
Name
is not null);
41
string hashAlgorithmName = hashAlgorithm.
Name
;
System\Security\Cryptography\Rfc2898DeriveBytes.cs (2)
249
if (string.IsNullOrEmpty(hashAlgorithm.
Name
))
263
throw 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
" />
268
Debug.Assert(hashAlgorithm.
Name
is not null);
309
Debug.Assert(hashAlgorithm.
Name
is not null);
322
string? hashAlgorithmName = hashAlgorithm.
Name
;
326
if (hashAlgorithmName == HashAlgorithmName.SHA1.
Name
||
327
hashAlgorithmName == HashAlgorithmName.SHA256.
Name
||
328
hashAlgorithmName == HashAlgorithmName.SHA384.
Name
||
329
hashAlgorithmName == HashAlgorithmName.SHA512.
Name
)
334
if (hashAlgorithmName == HashAlgorithmName.SHA3_256.
Name
||
335
hashAlgorithmName == HashAlgorithmName.SHA3_384.
Name
||
336
hashAlgorithmName == HashAlgorithmName.SHA3_512.
Name
)
System\Security\Cryptography\RSA.cs (18)
394
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
404
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
413
ArgumentException.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.
458
ArgumentException.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.
521
ArgumentException.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.
564
ArgumentException.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.
623
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
658
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
669
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
678
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
System\Security\Cryptography\RSABCrypt.cs (6)
146
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
169
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
206
padding.OaepHashAlgorithm.
Name
,
250
padding.OaepHashAlgorithm.
Name
);
265
string? hashAlgorithmName = hashAlgorithm.
Name
;
325
string? hashAlgorithmName = hashAlgorithm.
Name
;
System\Security\Cryptography\RSACryptoServiceProvider.Windows.cs (4)
553
hashAlgorithm.
Name
switch
560
_ => throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
),
638
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
654
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
System\Security\Cryptography\RSAEncryptionPadding.cs (3)
68
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
85
/// If <see cref="Mode"/> is not <see cref="RSAEncryptionPaddingMode.Oaep"/>, then <see cref="HashAlgorithmName.
Name
" /> will be null.
132
return _mode.ToString() + _oaepHashAlgorithm.
Name
;
System\Security\Cryptography\SP800108HmacCounterKdfImplementationCng.cs (2)
12
Debug.Assert(hashAlgorithm.
Name
is not null);
17
int hashAlgorithmBlockSize = GetHashBlockSize(hashAlgorithm.
Name
);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (6)
76
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
103
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
134
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
170
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
509
if (string.IsNullOrEmpty(HashAlgorithm.
Name
) &&
1021
if (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"/>
145
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
287
/// <see cref="HashAlgorithmName.
Name
"/>.
297
/// <see cref="HashAlgorithmName.
Name
"/> and <paramref name="generator"/>
343
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
System\Security\Cryptography\X509Certificates\ECDsaX509SignatureGenerator.cs (1)
54
SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
));
System\Security\Cryptography\X509Certificates\RSAPkcs1X509SignatureGenerator.cs (1)
80
SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
));
System\Security\Cryptography\X509Certificates\RSAPssX509SignatureGenerator.cs (1)
58
SR.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.
726
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
760
/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.
Name
"/> is <see langword="null"/> or empty.
776
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
System.Security.Cryptography.Cose (10)
System\Security\Cryptography\Cose\CoseKey.cs (8)
34
ArgumentNullException.ThrowIfNull(hashAlgorithm.
Name
);
48
ArgumentNullException.ThrowIfNull(hashAlgorithm.
Name
);
274
return hashAlgorithm.
Name
switch
279
_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.
Name
), nameof(hashAlgorithm))
285
return hashAlgorithm.
Name
switch
290
_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.
Name
), nameof(hashAlgorithm))
296
return hashAlgorithm.
Name
switch
301
_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.
Name
), nameof(hashAlgorithm))
System\Security\Cryptography\Cose\CoseSigner.cs (2)
184
exMsg = SR.Format(SR.Sign1SignCoseAlgorithmDoesNotMatchSpecifiedKeyHashAlgorithmAndPadding, alg.Value, CoseKey.KeyType, HashAlgorithm.
Name
, RSASignaturePadding);
192
exMsg = 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)
235
throw new CryptographicException(SR.Cryptography_Cms_UnknownAlgorithm, algName.
Name
);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (3)
61
pbeParameters.HashAlgorithm.
Name
);
176
Debug.Assert(digestAlgorithmName.
Name
!= null);
329
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, prf.
Name
);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
101
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
System\Security\Cryptography\Pkcs\CmsSignature.RSA.cs (1)
381
Debug.Assert(hashAlgorithmName == HashAlgorithmName.MD5, $"Unsupported digest algorithm '{hashAlgorithmName.
Name
}'");