3 types derived from SHA1
System.Security.Cryptography (3)
System\Security\Cryptography\SHA1.cs (1)
187private sealed class Implementation : SHA1
System\Security\Cryptography\SHA1CryptoServiceProvider.cs (1)
14public sealed class SHA1CryptoServiceProvider : SHA1
System\Security\Cryptography\SHA1Managed.cs (1)
12public sealed class SHA1Managed : SHA1
81 references to SHA1
Aspire.Hosting (1)
Utils\ImageNameGenerator.cs (1)
26var hash = SHA1.HashData(bytes);
EventSourceGenerator (2)
EventSourceGenerator.Parser.cs (2)
183using (SHA1 sha = SHA1.Create())
ILCompiler.ReadyToRun (6)
Compiler\CryptographicHashProvider.cs (6)
107return SHA1.Create(); 138return SHA1.Create(); 191using (var hashProvider = SHA1.Create()) 207using (var hashProvider = SHA1.Create())
Microsoft.AspNetCore.WebSockets (1)
HandshakeHelpers.cs (1)
65var written = SHA1.HashData(mergedBytes, hashedBytes);
Microsoft.Build.Tasks.Core (3)
ManifestUtil\mansign2.cs (2)
599using (SHA1 sha1 = SHA1.Create(
ManifestUtil\Util.cs (1)
233hashAlg = SHA1.Create(
Microsoft.CodeAnalysis (7)
CryptographicHashProvider.cs (6)
92return SHA1.Create(); 137return SHA1.Create(); 193using (var hashProvider = SHA1.Create()) 210using (var hashProvider = SHA1.Create())
Text\SourceHashAlgorithms.cs (1)
62SourceHashAlgorithm.Sha1 => SHA1.Create(),
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Compilers\Core\Portable\Text\SourceHashAlgorithms.cs (1)
62SourceHashAlgorithm.Sha1 => SHA1.Create(),
Microsoft.DotNet.Build.Tasks.Installers (4)
src\GenerateGuidFromName.cs (2)
24using (SHA1 hasher = SHA1.Create()) // lgtm [cs/weak-crypto] Algorithm is required by UUIDv5 spec
src\RpmBuilder.cs (2)
403using (SHA1 sha1 = SHA1.Create())
Microsoft.DotNet.StrongName (2)
Signing.cs (2)
362using (SHA1 sha1 = SHA1.Create())
Microsoft.TestPlatform.AdapterUtilities (2)
TestIdProvider.cs (2)
18private readonly SHA1 _sha; 25_sha = SHA1.Create();
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
Utilities\EqtHash.cs (1)
31using HashAlgorithm provider = SHA1.Create();
Mono.Cecil (5)
Mono.Cecil\AssemblyNameReference.cs (1)
121 algorithm = SHA1.Create ();
Mono.Security.Cryptography\CryptoService.cs (4)
29 static SHA1 CreateSHA1 () => new SHA1CryptoServiceProvider (); 98 var sha1 = CreateSHA1 (); 136 var sha1 = CreateSHA1 (); 147 var sha1 = CreateSHA1 ();
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
921[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA1))]
netstandard (1)
netstandard.cs (1)
1925[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA1))]
PresentationBuildTasks (1)
MS\Internal\Tasks\TaskFileService.cs (1)
186hashAlgorithm = SHA1.Create();
PresentationFramework (1)
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (1)
138return encode_guid(SHA1.HashData(data));
sdk-tasks (2)
GenerateGuidFromName.cs (2)
18using (SHA1 hasher = SHA1.Create()) // CodeQL [SM02196] SHA1 is consistent with the UUID version 5 algorithm. This is used for a unique upgrade code but not for security
System.Configuration.ConfigurationManager (2)
src\runtime\src\libraries\Common\src\System\Security\IdentityHelper.cs (2)
68using (SHA1 sha1 = SHA1.Create())
System.IO.IsolatedStorage (2)
src\runtime\src\libraries\Common\src\System\Security\IdentityHelper.cs (2)
68using (SHA1 sha1 = SHA1.Create())
System.Net.HttpListener (1)
System\Net\WebSockets\HttpWebSocket.cs (1)
25byte[] hash = SHA1.HashData(toHash);
System.Security.Cryptography (24)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (1)
81digestLengthInBytes = SHA1.HashSizeInBytes;
System\Security\Cryptography\CapiHelper.Windows.cs (3)
1062if (hashAlg is SHA1) 1082if (typeof(SHA1).IsAssignableFrom(hashAlgType)) 1108CapiHelper.CALG_SHA1 => SHA1.Create(),
System\Security\Cryptography\CryptographicOperations.cs (1)
1105return SHA1.HashSizeInBytes;
System\Security\Cryptography\DSACryptoServiceProvider.Windows.cs (8)
389byte[] hashVal = SHA1.HashData(inputStream); 400byte[] hashVal = SHA1.HashData(buffer); 413byte[] hashVal = SHA1.HashData(new ReadOnlySpan<byte>(buffer, offset, count)); 425byte[] hashVal = SHA1.HashData(rgbData); 457return SHA1.HashData(new ReadOnlySpan<byte>(data, offset, count)); 471return SHA1.HashData(data); 489if (rgbHash.Length != SHA1.HashSizeInBytes) 490throw new CryptographicException(SR.Format(SR.Cryptography_InvalidHashSize, "SHA1", SHA1.HashSizeInBytes));
System\Security\Cryptography\HashAlgorithmNames.cs (1)
33if (hashAlgorithm is SHA1)
System\Security\Cryptography\HashProviderDispenser.Windows.cs (1)
209digestSizeInBytes = SHA1.HashSizeInBytes;
System\Security\Cryptography\HMACCommon.cs (1)
95modifiedKey = SHA1.HashData(key);
System\Security\Cryptography\SHA1.cs (3)
44public static new SHA1 Create() => new Implementation(); 48public static new SHA1? Create(string hashName) => (SHA1?)CryptoConfig.CreateFromName(hashName);
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (5)
168return SHA1.HashData(key.EncodedKeyValue.RawData); 172Span<byte> sha1 = stackalloc byte[SHA1.HashSizeInBytes]; 173int written = SHA1.HashData(key.EncodedKeyValue.RawData, sha1); 174Debug.Assert(written == SHA1.HashSizeInBytes); 180byte[] shortSha1 = sha1.Slice(SHA1.HashSizeInBytes - 8).ToArray();
System.Security.Cryptography.Algorithms (1)
System.Security.Cryptography.Algorithms.cs (1)
54[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA1))]
System.Security.Cryptography.Xml (6)
System\Security\Cryptography\Xml\DSASignatureDescription.cs (1)
47return SHA1.Create();
System\Security\Cryptography\Xml\RSAPKCS1SHA1SignatureDescription.cs (1)
19return SHA1.Create();
System\Security\Cryptography\Xml\SymmetricKeyWrap.cs (4)
24using (var sha = SHA1.Create()) 103using (var sha = SHA1.Create())
System.ServiceModel.NetNamedPipe (1)
System\ServiceModel\Channels\PipeConnectionInitiator.cs (1)
398return SHA1.Create(); // CodeQL [SM02196] Here SHA1 is not used for cryptographic purposes, it's for compatibility.
System.ServiceModel.Primitives (3)
System\IdentityModel\CryptoHelper.cs (3)
199return SHA1.Create();// CodeQL [SM02196] Insecure cryptographic algorithm SHA1 is needed here as a requirement of SOAP protocols 226return SHA1.Create();// CodeQL [SM02196] Insecure cryptographic algorithm SHA1 is needed here as a requirement of SOAP protocols 343return SHA1.Create();// CodeQL [SM02196] Insecure cryptographic algorithm SHA1 is needed here as a requirement of SOAP protocols