Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check output size in Expand and DeriveKey in HKDF and throw ArgumentOutOfRangeException when needed #52259

Closed
wants to merge 2 commits into from
Closed

Check output size in Expand and DeriveKey in HKDF and throw ArgumentOutOfRangeException when needed #52259

wants to merge 2 commits into from

Conversation

ADustyOldMuffin
Copy link
Contributor

This closes #42229 and closes #42230

This should add some consistency to these methods and will throw an ArgumentOutOfRangeException on output and outputLength if the values for these are either 0 or less than 0 since an output of 0 doesn't make much sense, and less than 0 isn't possible.

Also added tests to check all of these scenarios.

@ghost
Copy link

ghost commented May 4, 2021

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks
See info in area-owners.md if you want to be subscribed.

Issue Details

This closes #42229 and closes #42230

This should add some consistency to these methods and will throw an ArgumentOutOfRangeException on output and outputLength if the values for these are either 0 or less than 0 since an output of 0 doesn't make much sense, and less than 0 isn't possible.

Also added tests to check all of these scenarios.

Author: ADustyOldMuffin
Assignees: -
Labels:

area-System.Security

Milestone: -

@ADustyOldMuffin ADustyOldMuffin deleted the hkdf-throw-diff-exception branch May 4, 2021 18:08
@ADustyOldMuffin ADustyOldMuffin restored the hkdf-throw-diff-exception branch May 4, 2021 18:10
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants