3 types derived from SHA256
System.Security.Cryptography (3)
System\Security\Cryptography\SHA256.cs (1)
238private sealed class Implementation : SHA256
System\Security\Cryptography\SHA256CryptoServiceProvider.cs (1)
14public sealed class SHA256CryptoServiceProvider : SHA256
System\Security\Cryptography\SHA256Managed.cs (1)
12public sealed class SHA256Managed : SHA256
133 references to SHA256
Aspire.Hosting (2)
DistributedApplicationBuilder.cs (2)
183var appHostNameShaBytes = SHA256.HashData(Encoding.UTF8.GetBytes(appHostName)); 188var appHostShaBytes = SHA256.HashData(Encoding.UTF8.GetBytes(AppHostPath));
BuildBoss (2)
CompilerNuGetCheckerUtil.cs (2)
333using var hash = SHA256.Create();
csc (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
571using (var sha = SHA256.Create())
dotnet-openapi (2)
Commands\BaseCommand.cs (2)
503using var algorithm = SHA256.Create();
Microsoft.Arcade.Common (2)
Helpers.cs (2)
24using (var hasher = SHA256.Create())
Microsoft.AspNetCore.Antiforgery (2)
Internal\AntiforgeryOptionsSetup.cs (1)
34byte[] fullHash = SHA256.HashData(Encoding.UTF8.GetBytes(applicationId));
Internal\DefaultClaimUidExtractor.cs (1)
142var bytes = SHA256.HashData(buffer);
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
88var challengeBytes = SHA256.HashData(Encoding.UTF8.GetBytes(codeVerifier));
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
322var challengeBytes = SHA256.HashData(Encoding.UTF8.GetBytes(codeVerifier));
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectHandler.cs (1)
420var challengeBytes = SHA256.HashData(Encoding.UTF8.GetBytes(codeVerifier));
Microsoft.AspNetCore.Components.Endpoints (4)
Builder\ResourceCollectionUrlEndpoint.cs (2)
78SHA256.HashData(bytes, hash); 178SHA256.HashData(content, data);
Rendering\TypeNameHash.cs (2)
29Span<byte> typeNameHashBytes = stackalloc byte[SHA256.HashSizeInBytes]; 30SHA256.HashData(typeNameBytes[..written], typeNameHashBytes);
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
TypeNameHashTest.cs (1)
16private const int ExpectedHashLength = SHA256.HashSizeInBytes * 2;
Microsoft.AspNetCore.Http.Connections.Tests (2)
HttpConnectionDispatcherTests.cs (2)
3194SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray())); 3356var SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
Microsoft.AspNetCore.Identity.Test (2)
IdentityUIScriptsTest.cs (2)
50using (var alg256 = SHA256.Create())
Microsoft.AspNetCore.Mvc.Razor (1)
Infrastructure\DefaultFileVersionProvider.cs (1)
91var hash = SHA256.HashData(readStream);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (3)
ChecksumValidator.cs (3)
102if (nameof(SHA256).Equals(checksumAlgorithm, StringComparison.OrdinalIgnoreCase)) 104hashData = SHA256.HashData; 105algorithmName = nameof(SHA256);
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Cache\CacheTagKey.cs (1)
181var hashedBytes = SHA256.HashData(contentBytes);
Microsoft.AspNetCore.Mvc.Views.TestCommon (1)
TestRazorCompiledItem.cs (1)
55var bytes = SHA256.HashData(Encoding.UTF8.GetBytes(content));
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Startup.cs (1)
27private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
Microsoft.AspNetCore.SignalR.Tests (1)
Startup.cs (1)
24private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
Microsoft.AspNetCore.StaticAssets (2)
Development\StaticAssetDevelopmentRuntimeHandler.cs (2)
63return $"\"{Convert.ToBase64String(SHA256.HashData(stream))}\""; 116var eTag = Convert.ToBase64String(SHA256.HashData(stream));
Microsoft.AspNetCore.StaticAssets.Tests (3)
StaticAssetsIntegrationTests.cs (3)
468return $"\"{Convert.ToBase64String(SHA256.HashData(stream))}\""; 556return Convert.ToBase64String(SHA256.HashData(stream)); 561var hash = SHA256.HashData(Encoding.UTF8.GetBytes(content));
Microsoft.Build (4)
CommunicationsUtilities.cs (2)
180using var sha = SHA256.Create();
Evaluation\IntrinsicFunctions.cs (2)
469using var sha = System.Security.Cryptography.SHA256.Create();
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
571using (var sha = SHA256.Create())
Microsoft.Build.Tasks.Core (10)
BootstrapperUtil\BootstrapperBuilder.cs (2)
1624using System.Security.Cryptography.SHA256 sha = System.Security.Cryptography.SHA256.Create(
FileIO\GetFileHash.cs (1)
29["SHA256"] = SHA256.Create,
Hash.cs (1)
124return SHA256.Create();
ManifestUtil\mansign2.cs (4)
570using (SHA256 sha2 = SHA256.Create( 633using (SHA256 sha2 = SHA256.Create(
ManifestUtil\RSAPKCS1SHA256SignatureDescription.cs (1)
19DigestAlgorithm = typeof(SHA256).FullName;
ManifestUtil\Util.cs (1)
260hashAlg = SHA256.Create(
Microsoft.CodeAnalysis (3)
CryptographicHashProvider.cs (2)
89return SHA256.Create(); 122return SHA256.Create();
Text\SourceHashAlgorithms.cs (1)
55SourceHashAlgorithm.Sha256 => SHA256.Create(),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
PdbSourceDocument\PdbSourceDocumentLoaderServiceTests.cs (2)
45using var hash = SHA256.Create();
Microsoft.CodeAnalysis.Features (2)
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (2)
704using (var sha256 = SHA256.Create())
Microsoft.CodeAnalysis.Workspaces (5)
Log\AnalyzerNameForTelemetry.cs (2)
15using var sha256 = SHA256.Create();
src\Compilers\Core\Portable\Text\SourceHashAlgorithms.cs (1)
55SourceHashAlgorithm.Sha256 => SHA256.Create(),
Workspace\Solution\SourceGeneratedDocumentIdentity.cs (2)
65using var crytpoAlgorithm = System.Security.Cryptography.SHA256.Create();
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\SolutionTests.cs (2)
1608var sha256 = SHA256.Create();
Microsoft.DotNet.Arcade.Sdk (2)
src\GenerateSourcePackageSourceLinkTargetsFile.cs (2)
108using (var hashAlg = SHA256.Create())
Microsoft.DotNet.Build.Tasks.Installers (6)
src\RpmBuilder.cs (6)
230using (SHA256 sha256 = SHA256.Create()) 383using (SHA256 sha256 = SHA256.Create()) 412using (SHA256 sha256 = SHA256.Create())
Microsoft.DotNet.Build.Tasks.VisualStudio (4)
Vsix\FinalizeInsertionVsixFile.cs (2)
67using (var sha = SHA256.Create())
Vsix\GetPkgDefAssemblyDependencyGuid.cs (2)
52using (var sha2 = SHA256.Create())
Microsoft.DotNet.Build.Tasks.Workloads (2)
Utils.cs (2)
150using (SHA256 sha256 = SHA256.Create())
Microsoft.DotNet.SignTool (2)
src\ContentUtil.cs (2)
44using (var sha2 = SHA256.Create())
Microsoft.DotNet.SignTool.Tests (2)
SignToolTests.cs (2)
512using (SHA256 sha256 = SHA256.Create())
Microsoft.Extensions.AI (2)
CachingHelpers.cs (2)
81using var sha256 = SHA256.Create();
MSBuild (2)
CommunicationsUtilities.cs (2)
180using var sha = SHA256.Create();
MSBuildTaskHost (2)
CommunicationsUtilities.cs (2)
180using var sha = SHA256.Create();
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
924[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA256))]
netstandard (1)
netstandard.cs (1)
1928[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA256))]
PresentationBuildTasks (1)
MS\Internal\Tasks\TaskFileService.cs (1)
183hashAlgorithm = SHA256.Create();
Replay (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
571using (var sha = SHA256.Create())
SemanticSearch.BuildTask (2)
GenerateFilteredReferenceAssembliesTask.cs (2)
553using var sha = SHA256.Create();
SignalR.Client.FunctionalTestApp (1)
Startup.cs (1)
25private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
System.Drawing.Common.Tests (6)
DrawingTest.cs (2)
10private static readonly Security.Cryptography.SHA256 s_md5 = Security.Cryptography.SHA256.Create();
mono\System.Drawing\BitmapTests.cs (4)
389hash = SHA256.HashData(pixels); 434byte[] hash = SHA256.HashData(pixel_data); 497return SHA256.HashData(pixels); 543return SHA256.HashData(pixels);
System.Net.Http (3)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (3)
215Span<byte> hashBuffer = stackalloc byte[SHA256.HashSizeInBytes]; // SHA256 is the largest hash produced 221written = SHA256.HashData(dataBytes, hashBuffer); 222Debug.Assert(written == SHA256.HashSizeInBytes);
System.Net.Security (1)
System\Net\Security\Pal.Managed\EndpointChannelBindingToken.cs (1)
43return SHA256.HashData(cert.RawDataMemory.Span);
System.Security.Cryptography (12)
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (1)
84digestLengthInBytes = SHA256.HashSizeInBytes;
System\Security\Cryptography\CapiHelper.Unix.cs (2)
43SHA256 => HashAlgorithmName.SHA256, 71if (typeof(SHA256).IsAssignableFrom(hashAlgType))
System\Security\Cryptography\CryptographicOperations.cs (1)
778return SHA256.HashSizeInBytes;
System\Security\Cryptography\HashAlgorithmNames.cs (1)
35if (hashAlgorithm is SHA256)
System\Security\Cryptography\HMACCommon.cs (1)
74modifiedKey = SHA256.HashData(key);
System\Security\Cryptography\SHA256.cs (3)
36public static new SHA256 Create() => new Implementation(); 40public static new SHA256? Create(string hashName) => (SHA256?)CryptoConfig.CreateFromName(hashName);
System\Security\Cryptography\X509Certificates\OpenSslCrlCache.cs (2)
278Span<byte> hash = stackalloc byte[SHA256.HashSizeInBytes]; 284if (SHA256.HashData(utf16Url, hash) != hash.Length)
System\Security\Cryptography\X509Certificates\RSAPssX509SignatureGenerator.cs (1)
40cbSalt = SHA256.HashSizeInBytes;
System.Security.Cryptography.Algorithms (1)
System.Security.Cryptography.Algorithms.cs (1)
56[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA256))]
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\RSAPKCS1SHA256SignatureDescription.cs (1)
18return SHA256.Create();
System.ServiceModel.NetNamedPipe (1)
System\ServiceModel\Channels\PipeConnectionInitiator.cs (1)
402return SHA256.Create();
System.Text.RegularExpressions.Generator (2)
RegexGenerator.Emitter.cs (2)
5442using SHA256 sha = SHA256.Create();
vbc (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
571using (var sha = SHA256.Create())
VBCSCompiler (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
571using (var sha = SHA256.Create())
VisualBasicSyntaxGenerator (1)
Program.vb (1)
99Dim func = SHA256.Create()
WebTransportInteractiveSampleApp (1)
Program.cs (1)
18var hash = SHA256.HashData(certificate.RawData);
WebTransportSampleApp (1)
Program.cs (1)
88var hash = SHA256.HashData(cert.RawData);