61 references to Sha256
Metrics (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\AdditionalTextExtensions.cs (1)
15private static readonly SourceText s_emptySourceText = SourceText.From("", s_utf8bom, SourceHashAlgorithm.Sha256);
Metrics.Legacy (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\AdditionalTextExtensions.cs (1)
15private static readonly SourceText s_emptySourceText = SourceText.From("", s_utf8bom, SourceHashAlgorithm.Sha256);
Microsoft.CodeAnalysis (9)
CommandLine\CommandLineParser.cs (1)
1216return SourceHashAlgorithm.Sha256;
CryptographicHashProvider.cs (3)
72case SourceHashAlgorithm.Sha256: 88case SourceHashAlgorithm.Sha256: 104case SourceHashAlgorithm.Sha256:
Text\SourceHashAlgorithms.cs (5)
16public const SourceHashAlgorithm Default = SourceHashAlgorithm.Sha256; 32SourceHashAlgorithm.Sha256 => true, 40SourceHashAlgorithm.Sha256 => s_guidSha256, 45=> (guid == s_guidSha256) ? SourceHashAlgorithm.Sha256 : 55SourceHashAlgorithm.Sha256 => SHA256.Create(),
Microsoft.CodeAnalysis.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\AdditionalTextExtensions.cs (1)
15private static readonly SourceText s_emptySourceText = SourceText.From("", s_utf8bom, SourceHashAlgorithm.Sha256);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\AdditionalTextExtensions.cs (1)
15private static readonly SourceText s_emptySourceText = SourceText.From("", s_utf8bom, SourceHashAlgorithm.Sha256);
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\AdditionalTextExtensions.cs (1)
15private static readonly SourceText s_emptySourceText = SourceText.From("", s_utf8bom, SourceHashAlgorithm.Sha256);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
5827Assert.Equal(SourceHashAlgorithm.Sha256, parsedArgs.ChecksumAlgorithm); 5833Assert.Equal(SourceHashAlgorithm.Sha256, parsedArgs.ChecksumAlgorithm);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
PDB\CheckSumTest.cs (1)
35var tree256 = SyntaxFactory.ParseSyntaxTree(StringText.From(source256, Encoding.UTF8, SourceHashAlgorithm.Sha256), path: "sha256.cs");
PDB\PDBTests.cs (2)
104context.AddSource("hint2", SourceText.From("class G2 { void F() {} }", Encoding.UTF8, checksumAlgorithm: SourceHashAlgorithm.Sha256)); 106Assert.Throws<ArgumentException>(() => context.AddSource("hint3", SourceText.From("class G3 { void F() {} }", encoding: null, checksumAlgorithm: SourceHashAlgorithm.Sha256)));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Syntax\Mocks\MockCSharpSyntaxTree.cs (1)
29_sourceText = source ?? SourceText.From("", Encoding.UTF8, SourceHashAlgorithm.Sha256);
Syntax\SyntaxTreeTests.cs (2)
86SyntaxTreeFactoryKind.ParseText => CSharpSyntaxTree.ParseText(SourceText.From(source, Encoding.UTF8, SourceHashAlgorithm.Sha256), parseOptions), 87SyntaxTreeFactoryKind.Subclass => new MockCSharpSyntaxTree(root, SourceText.From(source, Encoding.UTF8, SourceHashAlgorithm.Sha256), parseOptions),
Microsoft.CodeAnalysis.Features (1)
SemanticSearch\SemanticSearchUtilities.cs (1)
69=> SourceText.From(query, Encoding.UTF8, SourceHashAlgorithm.Sha256);
Microsoft.CodeAnalysis.Features.UnitTests (3)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (2)
926var moduleId = EmitAndLoadLibraryToDebuggee(source1, sourceFilePath: sourceFile.Path, encoding: encoding, checksumAlgorithm: SourceHashAlgorithm.Sha256); 1787context.AddSource("generated.cs", SourceText.From("generated: " + additionalText, Encoding.UTF8, SourceHashAlgorithm.Sha256));
EditAndContinue\WatchHotReloadServiceTests.cs (1)
157context.AddSource("generated.cs", SourceText.From("generated: " + additionalText, Encoding.UTF8, SourceHashAlgorithm.Sha256));
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\AdditionalTextExtensions.cs (1)
15private static readonly SourceText s_emptySourceText = SourceText.From("", s_utf8bom, SourceHashAlgorithm.Sha256);
Microsoft.CodeAnalysis.Rebuild (1)
CompilationOptionsReader.cs (1)
188: hashAlgorithmGuid == HashAlgorithmSha256 ? SourceHashAlgorithm.Sha256
Microsoft.CodeAnalysis.Rebuild.UnitTests (3)
DeterministicKeyBuilderTests.cs (3)
36public static SourceHashAlgorithm HashAlgorithm { get; } = SourceHashAlgorithm.Sha256; 40SourceHashAlgorithm.Sha256 183var syntaxTree = ParseSyntaxTree("", fileName: "test", SourceHashAlgorithm.Sha256, (TParseOptions)parseOptions);
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
AbstractResxGenerator.cs (3)
208var errorText = SourceText.From(text, Encoding.UTF8, SourceHashAlgorithm.Sha256); 346OutputText = SourceText.From(result, Encoding.UTF8, SourceHashAlgorithm.Sha256); 704OutputText = SourceText.From(result, Encoding.UTF8, SourceHashAlgorithm.Sha256);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\AdditionalTextExtensions.cs (1)
15private static readonly SourceText s_emptySourceText = SourceText.From("", s_utf8bom, SourceHashAlgorithm.Sha256);
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
Verifiers\CSharpSourceGeneratorVerifier`1+Test.cs (1)
124TestState.GeneratedSources.Add((typeof(TSourceGenerator), name, SourceText.From(reader.ReadToEnd(), Encoding.UTF8, SourceHashAlgorithm.Sha256)));
Verifiers\VisualBasicSourceGeneratorVerifier`1+Test.cs (1)
109TestState.GeneratedSources.Add((typeof(VisualBasicResxGenerator), name, SourceText.From(reader.ReadToEnd(), Encoding.UTF8, SourceHashAlgorithm.Sha256)));
Microsoft.CodeAnalysis.UnitTests (3)
Text\SourceTextTests.cs (2)
96[InlineData(SourceHashAlgorithm.Sha256)] 252var hashAlgorithms = new[] { SourceHashAlgorithm.Sha1, SourceHashAlgorithm.Sha256 };
Text\StringTextDecodingTests.cs (1)
134var data = CreateMemoryStreamBasedEncodedText("", Encoding.UTF8, readEncodingOpt: null, algorithm: SourceHashAlgorithm.Sha256);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (2)
CommandLineTests.vb (2)
1914Assert.Equal(SourceHashAlgorithm.Sha256, parsedArgs.ChecksumAlgorithm) 1919Assert.Equal(SourceHashAlgorithm.Sha256, parsedArgs.ChecksumAlgorithm)
Microsoft.CodeAnalysis.Workspaces (5)
src\Compilers\Core\Portable\Text\SourceHashAlgorithms.cs (5)
16public const SourceHashAlgorithm Default = SourceHashAlgorithm.Sha256; 32SourceHashAlgorithm.Sha256 => true, 40SourceHashAlgorithm.Sha256 => s_guidSha256, 45=> (guid == s_guidSha256) ? SourceHashAlgorithm.Sha256 : 55SourceHashAlgorithm.Sha256 => SHA256.Create(),
Microsoft.CodeAnalysis.Workspaces.UnitTests (9)
SolutionTests\SolutionTests.cs (9)
1106loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD1;", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1125loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1144loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1236Assert.Equal(SourceHashAlgorithm.Sha256, newText1.ChecksumAlgorithm); 1257Assert.Equal(SourceHashAlgorithm.Sha256, newAddText1.ChecksumAlgorithm); 1278Assert.Equal(SourceHashAlgorithm.Sha256, newConfigText1.ChecksumAlgorithm); 1634solution = solution.WithProjectChecksumAlgorithm(projectId, SourceHashAlgorithm.Sha256); 1638await Verify(solution.GetRequiredDocument(fileDocumentId), SourceHashAlgorithm.Sha256, checksumSHA256); 3774.AddDocument(did, "test", SourceText.From(language == LanguageNames.CSharp ? "class C {}" : "Class C : End Class", Encoding.UTF8, SourceHashAlgorithm.Sha256), filePath: "old path");
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\AdditionalTextExtensions.cs (1)
15private static readonly SourceText s_emptySourceText = SourceText.From("", s_utf8bom, SourceHashAlgorithm.Sha256);
Roslyn.VisualStudio.Next.UnitTests (1)
Services\ServiceHubServicesTests.cs (1)
606[("SG.cs", CreateText("X", Encoding.UTF8, checksumAlgorithm: SourceHashAlgorithm.Sha256))]);
StackDepthTest (1)
Program.cs (1)
79var tree = SyntaxFactory.ParseSyntaxTree(SourceText.From(stringText, encoding: null, SourceHashAlgorithm.Sha256), parseOptions);
Test.Utilities (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\AdditionalTextExtensions.cs (1)
15private static readonly SourceText s_emptySourceText = SourceText.From("", s_utf8bom, SourceHashAlgorithm.Sha256);
Text.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\AdditionalTextExtensions.cs (1)
15private static readonly SourceText s_emptySourceText = SourceText.From("", s_utf8bom, SourceHashAlgorithm.Sha256);