Skip to content

Comments

Add SHA-384 and SHA-512 hash algorithm support for PDB checksums#2366

Merged
brianrob merged 2 commits intomainfrom
copilot/add-sha-384-512-support
Feb 19, 2026
Merged

Add SHA-384 and SHA-512 hash algorithm support for PDB checksums#2366
brianrob merged 2 commits intomainfrom
copilot/add-sha-384-512-support

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

PDB files can specify document checksums using SHA-384 or SHA-512 per the Portable PDB spec. TraceEvent currently only recognizes MD5, SHA-1, and SHA-256.

Changes

Added GUID constants for the new algorithms:

  • SHA-384: d99cfeb1-8c43-444a-8a6c-b61269d2a0bf
  • SHA-512: ef2d1afc-6550-46d6-b14b-d70afe9a5566

Updated hash algorithm instantiation in three locations:

  • PortableSymbolModule.cs - Portable PDB document handling
  • NativeSymbolModule.cs - Native PDB managed source checksum handling
  • SymbolReader.cs - ChecksumAlgorithm property type checks

All changes follow the existing pattern used for SHA-1 and SHA-256:

else if (hashAlgorithmGuid == HashAlgorithmSha384)
{
    _hashAlgorithm = System.Security.Cryptography.SHA384.Create();
}
else if (hashAlgorithmGuid == HashAlgorithmSha512)
{
    _hashAlgorithm = System.Security.Cryptography.SHA512.Create();
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Add support for SHA-384 and SHA-512 algorithms used in PDB</issue_title>
<issue_description>Guids for the new algorithms are:

SHA-384: d99cfeb1-8c43-444a-8a6c-b61269d2a0bf
SHA-512: ef2d1afc-6550-46d6-b14b-d70afe9a5566

See https://github.com/dotnet/runtime/blob/main/docs/design/specs/PortablePdb-Metadata.md#document-table-0x30</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for SHA-384 and SHA-512 algorithms in PDB Add SHA-384 and SHA-512 hash algorithm support for PDB checksums Feb 18, 2026
Copilot AI requested a review from brianrob February 18, 2026 23:23
{
_hashAlgorithm = System.Security.Cryptography.SHA256.Create();
}
else if (srcFormat.Header.algorithmId == guidSHA384)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmat do these new GUIDs apply to native PDBs (Windows) or just portable PDBs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both native and portable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Thanks. We'll get this merged.

@brianrob brianrob marked this pull request as ready for review February 19, 2026 01:36
@brianrob brianrob merged commit 8f9eaaa into main Feb 19, 2026
9 checks passed
@brianrob brianrob deleted the copilot/add-sha-384-512-support branch February 19, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for SHA-384 and SHA-512 algorithms used in PDB

4 participants