Skip to content

Conversation

@vcsjones
Copy link
Member

@vcsjones vcsjones commented Jan 1, 2026

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
Contributor

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

Copy link
Contributor

Copilot AI left a comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant