Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Assume hash handles are always reusable in HashProviderCng. - #122813

#122813
Merged
stephentoub merged 1 commit into
dotnet:maindotnet/runtime:mainfrom
vcsjones:rm-nonreusablehashalgsvcsjones/runtime:rm-nonreusablehashalgsCopy head branch name to clipboard
Jan 5, 2026
Merged

Assume hash handles are always reusable in HashProviderCng.#122813
stephentoub merged 1 commit into
dotnet:maindotnet/runtime:mainfrom
vcsjones:rm-nonreusablehashalgsvcsjones/runtime:rm-nonreusablehashalgsCopy head branch name to clipboard

Conversation

@vcsjones

@vcsjones vcsjones commented Jan 1, 2026

Copy link
Copy Markdown
Member

HashProviderCng was previously accounting for Windows 7 not supporting BCRYPT_HASH_REUSABLE_FLAG. We can assume this flag is always supported now that Windows 7 is not supported anymore.

Contributes to #71075.

HashProviderCng was previously accounting for Windows 7 not supporting BCRYPT_HASH_REUSABLE_FLAG. We can assume this flag is always supported now that Windows 7 is not supported anymore.
@vcsjones vcsjones self-assigned this Jan 1, 2026
Copilot AI review requested due to automatic review settings January 1, 2026 03:47
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes Windows 7 compatibility code from HashProviderCng by assuming that the BCRYPT_HASH_REUSABLE_FLAG is always supported, simplifying the implementation now that Windows 7 support has been dropped.

Key changes:

  • Removed the _reusable field and all conditional logic that handled non-reusable hash scenarios
  • Simplified the constructor to always create reusable hash handles without fallback logic
  • Streamlined the Reset() method to always use the reusable flag

@stephentoub
stephentoub merged commit a3c883c into dotnet:main Jan 5, 2026
93 of 94 checks passed
@vcsjones
vcsjones deleted the rm-nonreusablehashalgs branch January 5, 2026 23:49
@vcsjones vcsjones added this to the 11.0.0 milestone Jan 10, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.