270 references to Name
Microsoft.CodeAnalysis (7)
Compilation\Compilation.cs (1)
3260
Debug.Assert(!deterministic || moduleBeingBuilt.PdbChecksumAlgorithm.
Name
!= null);
Compilation\DeterministicKeyBuilder.cs (1)
416
writer.Write("pdbChecksumAlgorithm", options.PdbChecksumAlgorithm.
Name
);
Emit\EmitOptions.cs (1)
367
if (PdbChecksumAlgorithm.
Name
!= null)
NativePdbWriter\PdbWriter.cs (1)
42
private bool IsDeterministic { get => _hashAlgorithmNameOpt.
Name
!= null; }
PEWriter\PeWriter.cs (3)
204
Debug.Assert(!isDeterministic || context.Module.PdbChecksumAlgorithm.
Name
!= null);
206
var portablePdbIdProvider = (context.Module.PdbChecksumAlgorithm.
Name
!= null) ?
252
debugDirectoryBuilder.AddPdbChecksumEntry(context.Module.PdbChecksumAlgorithm.
Name
!, portablePdbContentHash);
Microsoft.DotNet.Build.Tasks.Workloads (1)
Utils.cs (1)
26
HashAlgorithm algorithm = HashAlgorithm.Create(hashName.
Name
);
Microsoft.DotNet.SignCheckLibrary (3)
Verification\ArchiveVerifier.cs (3)
40
string hashedPath = String.IsNullOrEmpty(directoryName) ? Utils.GetHash(@".\", HashAlgorithmName.SHA256.
Name
) :
41
Utils.GetHash(directoryName, HashAlgorithmName.SHA256.
Name
);
46
Utils.GetHash(archiveEntry.FullName, HashAlgorithmName.SHA256.
Name
) + Path.GetExtension(archiveEntry.FullName); // lgtm [cs/zipslip] Archive from trusted source
Roslyn.Test.PdbUtilities (2)
Reader\PdbValidation.cs (2)
607
if ((portablePdbStreamOpt != null || hasEmbeddedPdb) && hashAlgorithm.
Name
!= null)
612
Assert.Equal(hashAlgorithm.
Name
, pdbChecksumData.AlgorithmName);
System.Security.Cryptography (248)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Rsa.cs (4)
140
ArgumentNullException.ThrowIfNull(digestAlgorithm.
Name
, nameof(digestAlgorithm));
142
IntPtr digestAlgorithmPtr = Interop.Crypto.HashAlgorithmToEvp(digestAlgorithm.
Name
);
181
ArgumentNullException.ThrowIfNull(digestAlgorithm.
Name
, nameof(digestAlgorithm));
183
IntPtr digestAlgorithmPtr = Interop.Crypto.HashAlgorithmToEvp(digestAlgorithm.
Name
);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanDerivation.cs (2)
24
Debug.Assert(!string.IsNullOrEmpty(hashAlgorithm.
Name
));
49
Debug.Assert(!string.IsNullOrEmpty(hashAlgorithm.
Name
));
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (2)
24
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
44
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (3)
48
pbeParameters.HashAlgorithm.
Name
);
148
Debug.Assert(digestAlgorithmName.
Name
!= null);
301
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, prf.
Name
);
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
101
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (8)
193
Debug.Assert(padding.OaepHashAlgorithm.
Name
!= null);
194
hashAlgorithm = Interop.Crypto.HashAlgorithmToEvp(padding.OaepHashAlgorithm.
Name
);
260
Debug.Assert(padding.OaepHashAlgorithm.
Name
!= null);
261
hashAlgorithm = Interop.Crypto.HashAlgorithmToEvp(padding.OaepHashAlgorithm.
Name
);
730
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
756
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
788
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
845
padding.OaepHashAlgorithm.
Name
is string name &&
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (1)
75
switch (hashAlgorithmName.
Name
)
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.
125
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's <see langword="null" />.
129
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's empty.
183
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's <see langword="null" />.
187
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's empty.
236
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's <see langword="null" />.
239
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's empty.
269
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's <see langword="null" />.
272
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's empty.
300
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's <see langword="null" />.
303
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's empty.
341
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's <see langword="null" />.
344
/// <paramref name="hashAlgorithm" /> has a <see cref="HashAlgorithmName.
Name
" /> that's empty.
549
string? hashAlgorithmName = hashAlgorithm.
Name
;
System\Security\Cryptography\CryptographicOperations.cs (63)
78
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
83
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.
104
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
108
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.
119
Debug.Assert(hashAlgorithm.
Name
is not null);
122
int written = HashProviderDispenser.OneShotHashProvider.HashData(hashAlgorithm.
Name
, source, buffer);
137
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
140
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
173
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.
176
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
188
Debug.Assert(hashAlgorithm.
Name
is not null);
196
bytesWritten = HashProviderDispenser.OneShotHashProvider.HashData(hashAlgorithm.
Name
, source, destination);
211
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
216
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
230
Debug.Assert(hashAlgorithm.
Name
is not null);
231
return LiteHashProvider.HashStream(hashAlgorithm.
Name
, hashSizeInBytes, source);
245
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
252
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
266
Debug.Assert(hashAlgorithm.
Name
is not null);
269
int written = LiteHashProvider.HashStream(hashAlgorithm.
Name
, source, destination);
288
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
295
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
316
Debug.Assert(hashAlgorithm.
Name
is not null);
320
hashAlgorithm.
Name
,
339
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
344
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
364
Debug.Assert(hashAlgorithm.
Name
is not null);
366
return LiteHashProvider.HashStreamAsync(hashAlgorithm.
Name
, source, cancellationToken);
380
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
385
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.
408
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
412
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.
423
Debug.Assert(hashAlgorithm.
Name
is not null);
426
int written = HashProviderDispenser.OneShotHashProvider.MacData(hashAlgorithm.
Name
, key, source, buffer);
442
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
445
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
483
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.
486
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
503
Debug.Assert(hashAlgorithm.
Name
is not null);
511
bytesWritten = HashProviderDispenser.OneShotHashProvider.MacData(hashAlgorithm.
Name
, key, source, destination);
527
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
532
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
559
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
564
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
578
Debug.Assert(hashAlgorithm.
Name
is not null);
580
return LiteHashProvider.HmacStream(hashAlgorithm.
Name
, hashSizeInBytes, key, source);
595
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
600
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
616
Debug.Assert(hashAlgorithm.
Name
is not null);
619
return LiteHashProvider.HmacStream(hashAlgorithm.
Name
, key, source, destination);
636
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
641
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
679
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
686
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
708
Debug.Assert(hashAlgorithm.
Name
is not null);
711
return LiteHashProvider.HmacStreamAsync(hashAlgorithm.
Name
, key.Span, source, destination, cancellationToken);
728
/// <paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is
733
/// <para><paramref name="hashAlgorithm"/> has a <see cref="HashAlgorithmName.
Name
" /> that is empty.</para>
754
Debug.Assert(hashAlgorithm.
Name
is not null);
756
return LiteHashProvider.HmacStreamAsync(hashAlgorithm.
Name
, key.Span, source, cancellationToken);
773
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
775
switch (hashAlgorithm.
Name
)
809
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.Unix.cs (9)
104
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
112
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
120
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
206
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
214
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
222
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
264
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
272
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
);
280
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\HKDF.OpenSsl.cs (6)
22
Debug.Assert(hashAlgorithmName.
Name
is not null);
24
Interop.Crypto.HkdfExtract(Interop.Crypto.EvpKdfAlgs.Hkdf, ikm, hashAlgorithmName.
Name
, salt, prk);
42
Debug.Assert(hashAlgorithmName.
Name
is not null);
44
Interop.Crypto.HkdfExpand(Interop.Crypto.EvpKdfAlgs.Hkdf, prk, hashAlgorithmName.
Name
, info, output);
63
Debug.Assert(hashAlgorithmName.
Name
is not null);
68
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
);
319
/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.
Name
"/> is <c>null</c>, or
325
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
326
CheckSha3Support(hashAlgorithm.
Name
);
328
return new IncrementalHash(hashAlgorithm, HashProviderDispenser.CreateHashProvider(hashAlgorithm.
Name
));
349
/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.
Name
"/> is <c>null</c>, or
378
/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.
Name
"/> is <c>null</c>, or
384
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
385
CheckSha3Support(hashAlgorithm.
Name
);
387
return new IncrementalHash(hashAlgorithm, new HMACCommon(hashAlgorithm.
Name
, key, -1));
System\Security\Cryptography\Pbkdf2Implementation.OpenSsl.cs (2)
18
Debug.Assert(hashAlgorithmName.
Name
is not null);
19
IntPtr evpHashType = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmName.
Name
);
System\Security\Cryptography\Rfc2898DeriveBytes.cs (2)
246
if (string.IsNullOrEmpty(hashAlgorithm.
Name
))
260
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\RSACryptoServiceProvider.Unix.cs (1)
372
throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.
Name
));
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\SP800108HmacCounterKdfImplementationOpenSsl.cs (2)
44
_hashAlgorithm.
Name
!,
89
hashAlgorithm.
Name
!,
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (6)
75
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
102
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
133
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
169
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
197
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
228
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
System\Security\Cryptography\X509Certificates\CertificateRequest.Load.cs (2)
39
ArgumentException.ThrowIfNullOrEmpty(signerHashAlgorithm.
Name
, nameof(signerHashAlgorithm));
121
ArgumentException.ThrowIfNullOrEmpty(signerHashAlgorithm.
Name
, nameof(signerHashAlgorithm));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (6)
53
/// <see cref="HashAlgorithmName.
Name
"/>.
95
/// <see cref="HashAlgorithmName.
Name
"/>.
143
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
273
/// <see cref="HashAlgorithmName.
Name
"/>.
283
/// <see cref="HashAlgorithmName.
Name
"/>.
327
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)
599
/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.
Name
"/> is <see langword="null"/> or empty.
636
/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.
Name
"/> is <see langword="null"/> or empty.
661
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
695
/// <paramref name="hashAlgorithm"/>.<see cref="HashAlgorithmName.
Name
"/> is <see langword="null"/> or empty.
711
ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.
Name
, nameof(hashAlgorithm));
System.Security.Cryptography.Cose (3)
System\Security\Cryptography\Cose\CoseSigner.cs (3)
164
exMsg = SR.Format(SR.Sign1SignCoseAlgorithmDoesNotMatchSpecifiedKeyHashAlgorithmAndPadding, alg.Value, _keyType, HashAlgorithm.
Name
, RSASignaturePadding);
168
exMsg = SR.Format(SR.Sign1SignCoseAlgorithmDoesNotMatchSpecifiedKeyAndHashAlgorithm, alg.Value, _keyType, HashAlgorithm.
Name
);
177
string? hashAlgorithmName = HashAlgorithm.
Name
;
System.Security.Cryptography.Pkcs (6)
Internal\Cryptography\PkcsHelpers.cs (1)
109
throw new CryptographicException(SR.Cryptography_Cms_UnknownAlgorithm, algName.
Name
);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (3)
48
pbeParameters.HashAlgorithm.
Name
);
148
Debug.Assert(digestAlgorithmName.
Name
!= null);
301
throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, prf.
Name
);
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)
366
Debug.Assert(hashAlgorithmName == HashAlgorithmName.MD5, $"Unsupported digest algorithm '{hashAlgorithmName.
Name
}'");