46 references to 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.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)
64=> 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); 1791context.AddSource("generated.cs", SourceText.From("generated: " + additionalText, Encoding.UTF8, SourceHashAlgorithm.Sha256));
EditAndContinue\WatchHotReloadServiceTests.cs (1)
136context.AddSource("generated.cs", SourceText.From("generated: " + additionalText, Encoding.UTF8, 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.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)
1108loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD1;", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1127loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1146loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))), 1238Assert.Equal(SourceHashAlgorithm.Sha256, newText1.ChecksumAlgorithm); 1259Assert.Equal(SourceHashAlgorithm.Sha256, newAddText1.ChecksumAlgorithm); 1280Assert.Equal(SourceHashAlgorithm.Sha256, newConfigText1.ChecksumAlgorithm); 1636solution = solution.WithProjectChecksumAlgorithm(projectId, SourceHashAlgorithm.Sha256); 1640await Verify(solution.GetRequiredDocument(fileDocumentId), SourceHashAlgorithm.Sha256, checksumSHA256); 3773.AddDocument(did, "test", SourceText.From(language == LanguageNames.CSharp ? "class C {}" : "Class C : End Class", Encoding.UTF8, SourceHashAlgorithm.Sha256), filePath: "old path");
Roslyn.VisualStudio.Next.UnitTests (1)
Services\ServiceHubServicesTests.cs (1)
594[("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);