Skip to content

Conversation

martincostello
Copy link
Contributor

Use SHA512.HashDataAsync() for .NET 8 to reduce allocations.

Complements the change in #2322.

I manually verified the hash before and after was the same by getting the hash from the TestHashCodesForSimilarOpenApiDocuments test using the debugger and then verifying it was the same after the change with:

Assert.Equal("00BCB7FE78379A07956E06BF3180A8818F6E42E10BC38A7012A342CD6E1033BF03CB7E70E04B285C67BF4D78828D185C1FE438073C2474E40315F2ECE6310B78", doc1HashCode);

Use `SHA512.HashDataAsync()` for .NET 8 to reduce allocations.
@martincostello martincostello requested a review from a team as a code owner April 14, 2025 10:51
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@baywet baywet enabled auto-merge (squash) April 14, 2025 12:40
@baywet baywet merged commit 25136af into microsoft:main Apr 14, 2025
9 checks passed
@martincostello martincostello deleted the avoid-hashalgorithm-allocations branch April 14, 2025 12:42
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.

3 participants