3 types derived from SHA256
System.Security.Cryptography (3)
System\Security\Cryptography\SHA256.cs (1)
187private 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
196 references to SHA256
aspire (14)
Caching\DiskCache.cs (1)
160var hash = SHA256.HashData(bytes);
DotNet\DotNetCliRunner.cs (2)
814var bytes = await SHA256.HashDataAsync(stream, cancellationToken); 844var bytes = await SHA256.HashDataAsync(stream, cancellationToken);
NuGet\BundleNuGetService.cs (1)
201var hashBytes = System.Security.Cryptography.SHA256.HashData(System.Text.Encoding.UTF8.GetBytes(content));
NuGet\NuGetPackageCache.cs (2)
71using var sha256 = System.Security.Cryptography.SHA256.Create();
Projects\AppHostServerProject.cs (1)
45var pathHash = SHA256.HashData(Encoding.UTF8.GetBytes(normalizedPath));
Projects\DotNetBasedAppHostServerProject.cs (1)
68var pathHash = SHA256.HashData(Encoding.UTF8.GetBytes(_appPath));
Projects\GuestAppHostProject.cs (1)
1264var bytes = System.Security.Cryptography.SHA256.HashData(System.Text.Encoding.UTF8.GetBytes(sb.ToString()));
Projects\PrebuiltAppHostServer.cs (1)
75var pathHash = SHA256.HashData(Encoding.UTF8.GetBytes(_appPath));
src\Shared\BackchannelConstants.cs (1)
106var hashBytes = SHA256.HashData(Encoding.UTF8.GetBytes(appHostPath));
src\Shared\UserSecrets\UserSecretsPathHelper.cs (1)
62var hashBytes = SHA256.HashData(
Telemetry\MachineInformationProviderBase.cs (2)
26private static readonly SHA256 s_sHA256 = SHA256.Create();
Aspire.Cli.Tests (2)
Caching\DiskCacheTests.cs (2)
138using var sha = System.Security.Cryptography.SHA256.Create();
Aspire.Hosting (5)
Dcp\DcpExecutor.cs (1)
2831lookup = Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(lookup)));
DistributedApplicationBuilder.cs (2)
272var appHostPathShaBytes = SHA256.HashData(Encoding.UTF8.GetBytes(AppHostPath.ToLowerInvariant())); 276var appHostProjectNameShaBytes = SHA256.HashData(Encoding.UTF8.GetBytes(appHostName));
src\Shared\BackchannelConstants.cs (1)
106var hashBytes = SHA256.HashData(Encoding.UTF8.GetBytes(appHostPath));
src\Shared\UserSecrets\UserSecretsPathHelper.cs (1)
62var hashBytes = SHA256.HashData(
Aspire.Hosting.Tests (1)
Utils\VolumeNameGeneratorTests.cs (1)
130var expectedShaBytes = SHA256.HashData(Encoding.UTF8.GetBytes(builder.AppHostPath.ToLowerInvariant()));
csc (2)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
692using (var sha = SHA256.Create())
dotnet (2)
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.8.0-1.26276.122\contentFiles\cs\net11.0\BuildServerConnection.cs (2)
692using (var sha = SHA256.Create())
ILCompiler.Compiler (5)
Compiler\XmlObjectDumper.cs (2)
20private SHA256 _sha256; 36_sha256 = SHA256.Create();
src\runtime\src\coreclr\tools\Common\Compiler\NativeAotNameMangler.cs (2)
164hash = SHA256.HashData(GetBytesFromString(literal)); 189hash = SHA256.HashData(literal.AsSpan());
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\PEObjectWriter.cs (1)
880writer.Write(BlobContentId.FromHash(SHA256.HashData(originalOutput)).Stamp);
ILCompiler.ReadyToRun (6)
Compiler\CryptographicHashProvider.cs (2)
110return SHA256.Create(); 141return SHA256.Create();
Compiler\DependencyAnalysis\ReadyToRun\DebugDirectoryEntryNode.cs (1)
251SHA256.HashData(outputBlob)[0..ChecksumSize].CopyTo(checksumLocation);
src\runtime\src\coreclr\tools\Common\Compiler\NativeAotNameMangler.cs (2)
164hash = SHA256.HashData(GetBytesFromString(literal)); 189hash = SHA256.HashData(literal.AsSpan());
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\PEObjectWriter.cs (1)
880writer.Write(BlobContentId.FromHash(SHA256.HashData(originalOutput)).Stamp);
Microsoft.Arcade.Common (2)
Helpers.cs (2)
24using (var hasher = SHA256.Create())
Microsoft.AspNetCore.Antiforgery (3)
Internal\AntiforgeryOptionsSetup.cs (1)
34byte[] fullHash = SHA256.HashData(Encoding.UTF8.GetBytes(applicationId));
Internal\DefaultClaimUidExtractor.cs (2)
116Debug.Assert(destination.Length >= SHA256.HashSizeInBytes); 142SHA256.HashData(span.Slice(0, offset), destination);
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
322var challengeBytes = SHA256.HashData(Encoding.UTF8.GetBytes(codeVerifier));
Microsoft.AspNetCore.Components (4)
PersistentState\PersistentServicesRegistry.cs (1)
231var hash = SHA256.HashData(input);
PersistentState\PersistentStateValueProviderKeyResolver.cs (3)
61Span<byte> keyHash = stackalloc byte[SHA256.HashSizeInBytes]; 114var hashSucceeded = SHA256.TryHashData(keyBuffer, keyHash, out _); 197SHA256.HashData(Encoding.UTF8.GetBytes(string.Join(".", parts.parentComponentType, parts.componentType, parts.propertyName)));
Microsoft.AspNetCore.Components.Endpoints (4)
Builder\ResourceCollectionUrlEndpoint.cs (2)
78SHA256.HashData(bytes, hash); 217SHA256.HashData(content, data);
Rendering\TypeNameHash.cs (2)
29Span<byte> typeNameHashBytes = stackalloc byte[SHA256.HashSizeInBytes]; 30SHA256.HashData(typeNameBytes[..written], typeNameHashBytes);
Microsoft.AspNetCore.Identity (3)
PasskeyHandler.cs (3)
268var clientDataHash = SHA256.HashData(response.ClientDataJSON.AsSpan()); 513var clientDataHash = SHA256.HashData(response.ClientDataJSON.AsSpan()); 626var originalRpIdHash = SHA256.HashData(Encoding.UTF8.GetBytes(originalRpId ?? string.Empty));
Microsoft.AspNetCore.Mvc.Razor (1)
Infrastructure\DefaultFileVersionProvider.cs (1)
91var hash = SHA256.HashData(readStream);
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Cache\CacheTagKey.cs (1)
181var hashedBytes = SHA256.HashData(contentBytes);
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Utilities\HashAlgorithmOperations.cs (1)
11=> SHA256.Create();
Microsoft.AspNetCore.StaticAssets (2)
Development\StaticAssetDevelopmentRuntimeHandler.cs (2)
132return $"\"{Convert.ToBase64String(SHA256.HashData(stream))}\""; 197var eTag = Convert.ToBase64String(SHA256.HashData(stream));
Microsoft.Build (2)
Evaluation\IntrinsicFunctions.cs (2)
461Span<byte> hash = stackalloc byte[SHA256.HashSizeInBytes]; 462SHA256.HashData(Encoding.UTF8.GetBytes(toHash), hash);
Microsoft.Build.Framework (4)
BackEnd\ServerNodeHandshake.cs (2)
46Span<byte> bytes = stackalloc byte[SHA256.HashSizeInBytes]; 47SHA256.HashData(utf8, bytes);
Telemetry\CrashTelemetry.cs (1)
814byte[] hashBytes = SHA256.HashData(Encoding.UTF8.GetBytes(stackTrace));
Telemetry\TelemetryDataUtils.cs (1)
141byte[] hash = SHA256.HashData(bytes);
Microsoft.Build.Tasks.CodeAnalysis (2)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
692using (var sha = SHA256.Create())
Microsoft.Build.Tasks.Core (8)
BootstrapperUtil\BootstrapperBuilder.cs (2)
1628using System.Security.Cryptography.SHA256 sha = System.Security.Cryptography.SHA256.Create(
FileIO\GetFileHash.cs (1)
30["SHA256"] = SHA256.Create,
Hash.cs (1)
129return SHA256.Create();
ManifestUtil\mansign2.cs (2)
579using (SHA256 sha2 = SHA256.Create(
ManifestUtil\RSAPKCS1SHA256SignatureDescription.cs (1)
18DigestAlgorithm = typeof(SHA256).FullName;
ManifestUtil\Util.cs (1)
243hashAlg = SHA256.Create(
Microsoft.CodeAnalysis (3)
CryptographicHashProvider.cs (2)
95return SHA256.Create(); 140return SHA256.Create();
Text\SourceHashAlgorithms.cs (1)
63SourceHashAlgorithm.Sha256 => SHA256.Create(),
Microsoft.CodeAnalysis.Workspaces (3)
Log\AnalyzerNameForTelemetry.cs (2)
15using var sha256 = SHA256.Create();
src\roslyn\src\Compilers\Core\Portable\Text\SourceHashAlgorithms.cs (1)
63SourceHashAlgorithm.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)
226using (SHA256 sha256 = SHA256.Create()) 379using (SHA256 sha256 = SHA256.Create()) 408using (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.ProjectTools (1)
Utilities\Sha256Hasher.cs (1)
14=> Convert.ToHexStringLower(SHA256.HashData(Encoding.UTF8.GetBytes(text)));
Microsoft.DotNet.TemplateLocator (2)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (2)
305using (SHA256 sha256Hash = SHA256.Create())
Microsoft.NET.Build.Containers (5)
DigestUtils.cs (2)
98Span<byte> hash = stackalloc byte[SHA256.HashSizeInBytes]; 99SHA256.HashData(Encoding.UTF8.GetBytes(content), hash);
Layer.cs (3)
58Span<byte> hash = stackalloc byte[SHA256.HashSizeInBytes]; 59Span<byte> uncompressedHash = stackalloc byte[SHA256.HashSizeInBytes]; 149int bW = SHA256.HashData(fs, hash);
Microsoft.NET.Build.Tasks (4)
AllowEmptyTelemetry.cs (1)
81byte[] hash = System.Security.Cryptography.SHA256.HashData(utf8UpperBytes);
ResolvePackageAssets.cs (1)
342private HashAlgorithm CreateSettingsHash() => SHA256.Create();
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (2)
305using (SHA256 sha256Hash = SHA256.Create())
Microsoft.NET.HostModel (5)
Bundle\Manifest.cs (4)
78private SHA256 bundleHash = SHA256.Create(); 130using (SHA256 sha = SHA256.Create())
MachO\Enums\HashType.cs (1)
23HashType.SHA256 => SHA256.Create(),
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (8)
GenerateServiceWorkerAssetsManifest.cs (4)
47using var sha = SHA256.Create(); 71using var sha = SHA256.Create();
src\sdk\src\StaticWebAssetsSdk\Tasks\Data\StaticWebAsset.cs (2)
855var hash = SHA256.HashData(file); 874var hash = SHA256.HashData(file);
src\sdk\src\StaticWebAssetsSdk\Tasks\Utils\FileHasher.cs (2)
19var hashBytes = SHA256.HashData(bytes); 28var hashBytes = SHA256.HashData(bytes);
Microsoft.NET.Sdk.Razor.Tasks (2)
src\sdk\src\RazorSdk\Tool\PipeName.cs (2)
49using (var sha = SHA256.Create())
Microsoft.NET.Sdk.StaticWebAssets.Tasks (25)
Data\StaticAssetsManifest.cs (2)
57using var sha256 = SHA256.Create();
Data\StaticWebAsset.cs (2)
855var hash = SHA256.HashData(file); 874var hash = SHA256.HashData(file);
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
117var result = SHA256.HashData(data);
GenerateStaticWebAssetsDevelopmentManifest.cs (2)
135var currentHash = SHA256.HashData(data); 142SHA256.HashData(File.ReadAllBytes(ManifestPath)) :
GenerateStaticWebAssetsPropsFile.cs (1)
184var result = SHA256.HashData(data);
JSModules\GenerateJSModuleManifest.cs (2)
43var currentHash = SHA256.HashData(data); 52SHA256.HashData(File.ReadAllBytes(OutputFile)) :
Legacy\GenerateStaticWebAssetsPropsFile50.cs (1)
137var result = SHA256.HashData(data);
Legacy\GenerateV1StaticWebAssetsManifest.cs (2)
73var currentHash = SHA256.HashData(data); 80SHA256.HashData(File.ReadAllBytes(TargetManifestPath)) :
ScopedCss\ComputeCssScope.cs (1)
50var hashBytes = SHA256.HashData(bytes);
ServiceWorker\GenerateServiceWorkerAssetsManifest.cs (2)
90var bytes = SHA256.HashData(data); 128var bytes = SHA256.HashData(data);
StaticWebAssetsGeneratePackagePropsFile.cs (1)
85var result = SHA256.HashData(data);
StaticWebAssetsGeneratePackManifest.cs (1)
106var result = SHA256.HashData(data);
Utils\ArtifactWriter.cs (1)
49var hash = SHA256.HashData(data);
Utils\FileHasher.cs (2)
19var hashBytes = SHA256.HashData(bytes); 28var hashBytes = SHA256.HashData(bytes);
Utils\HashingUtils.cs (4)
18using var sha256 = SHA256.Create(); 35using var sha256 = SHA256.Create();
Microsoft.NET.Sdk.WorkloadManifestReader (2)
SdkDirectoryWorkloadManifestProvider.cs (2)
305using (SHA256 sha256Hash = SHA256.Create())
Microsoft.TestPlatform.Extensions.BlameDataCollector (2)
BlameCollector.cs (2)
580using SHA256 hashedLockName = SHA256.Create();
Mono.Cecil (2)
Mono.Cecil.Cil\PortablePdb.cs (2)
480 var sha256 = SHA256.Create ();
mscorlib (1)
src\runtime\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))]
NuGet.Common (3)
ConcurrencyUtilities.cs (2)
258using (var sha = SHA256.Create())
CryptoHashUtility.cs (1)
195return SHA256.Create();
NuGet.Protocol (2)
Utility\CachingUtility.cs (2)
29using (var sha = SHA256.Create())
PresentationBuildTasks (1)
MS\Internal\Tasks\TaskFileService.cs (1)
182hashAlgorithm = SHA256.Create();
RepoTasks (2)
Uuid.cs (2)
45using (SHA256 sha256 = SHA256.Create())
rzc (4)
DiscoverCommand.cs (2)
220using (var sha = SHA256.Create())
PipeName.cs (2)
49using (var sha = SHA256.Create())
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\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (1)
84digestLengthInBytes = SHA256.HashSizeInBytes;
System\Security\Cryptography\CapiHelper.Windows.cs (3)
1065if (hashAlg is SHA256) 1085if (typeof(SHA256).IsAssignableFrom(hashAlgType)) 1109CapiHelper.CALG_SHA_256 => SHA256.Create(),
System\Security\Cryptography\CryptographicOperations.cs (1)
1103return SHA256.HashSizeInBytes;
System\Security\Cryptography\HashAlgorithmNames.cs (1)
35if (hashAlgorithm is SHA256)
System\Security\Cryptography\HashProviderDispenser.Windows.cs (1)
216digestSizeInBytes = SHA256.HashSizeInBytes;
System\Security\Cryptography\HMACCommon.cs (1)
74modifiedKey = SHA256.HashData(key);
System\Security\Cryptography\SHA256.cs (3)
43public static new SHA256 Create() => new Implementation(); 47public static new SHA256? Create(string hashName) => (SHA256?)CryptoConfig.CreateFromName(hashName);
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.ServiceModel.Primitives (3)
System\IdentityModel\CryptoHelper.cs (3)
203return SHA256.Create(); 232return SHA256.Create(); 340return SHA256.Create();
System.Text.RegularExpressions.Generator (2)
RegexGenerator.Emitter.cs (2)
5571using SHA256 sha = SHA256.Create();
vbc (2)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
692using (var sha = SHA256.Create())
VBCSCompiler (3)
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (1)
123var bytes = SHA256.HashData(Encoding.UTF8.GetBytes(deterministicKey));
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
692using (var sha = SHA256.Create())