Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GVFS/GVFS.Common/Git/HashingStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public HashingStream(Stream stream)
{
this.stream = stream;

this.hash = SHA1.Create();
this.hash = SHA1.Create(); // CodeQL [SM02196] SHA-1 is acceptable here because this is Git's hashing algorithm, not used for cryptographic purposes
this.hashResult = null;
this.hash.Initialize();
this.closed = false;
Expand Down
2 changes: 1 addition & 1 deletion GVFS/GVFS.Common/SHA1Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static byte[] SHA1ForUTF8String(string s)
{
byte[] bytes = Encoding.UTF8.GetBytes(s);

using (SHA1 sha1 = SHA1.Create())
using (SHA1 sha1 = SHA1.Create()) // CodeQL [SM02196] SHA-1 is acceptable here because this is Git's hashing algorithm, not used for cryptographic purposes
{
return sha1.ComputeHash(bytes);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void Include()

public string HashedChildrenNamesSha()
{
using (HashAlgorithm hash = SHA1.Create())
using (HashAlgorithm hash = SHA1.Create()) // CodeQL [SM02196] SHA-1 is acceptable here because this is Git's hashing algorithm, not used for cryptographic purposes
{
for (int i = 0; i < this.ChildEntries.Count; i++)
{
Expand Down
Loading