Skip to content

Conversation

@vcsjones
Copy link
Member

There are only 5 hash algorithm names, we can just use a couple of if's instead of a HashSet. This removes the static constructor for HashAlgorithmNames, and ToUpper doesn't allocate a new upper-case string every time it's used. Also fixes a typo in the parameter name.

@ghost ghost added the area-System.Security label Jun 27, 2022
@ghost ghost assigned vcsjones Jun 27, 2022
@ghost
Copy link

ghost commented Jun 27, 2022

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

Issue Details

There are only 5 hash algorithm names, we can just use a couple of if's instead of a HashSet. This removes the static constructor for HashAlgorithmNames, and ToUpper doesn't allocate a new upper-case string every time it's used. Also fixes a typo in the parameter name.

Author: vcsjones
Assignees: -
Labels:

area-System.Security

Milestone: -

@vcsjones vcsjones merged commit aa06c89 into dotnet:main Jun 27, 2022
@vcsjones vcsjones deleted the alloc-cctor-hash-alg-names branch June 27, 2022 21:05
@ghost ghost locked as resolved and limited conversation to collaborators Jul 28, 2022
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.

3 participants