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

Move Sha1ForNonSecretPurposes under Common #45242

Merged
merged 5 commits into from
Nov 26, 2020

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Nov 25, 2020

Avoid code duplication and contribute to #45237 and #45032

Avoid code duplication and contribute to dotnet#45237 and dotnet#45032
Copy link
Member

@GrabYourPitchforks GrabYourPitchforks left a comment

Choose a reason for hiding this comment

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

Straightforward enough :)

@GrabYourPitchforks
Copy link
Member

No harm in duplicating this line as an internal helper within this file.

public static uint RotateLeft(uint value, int offset)
=> (value << offset) | (value >> (32 - offset));

@jkotas
Copy link
Member Author

jkotas commented Nov 26, 2020

The OOB library has BitOperations stub for this and other reasons. It just was not in the right namespace to be picked up here.

@GrabYourPitchforks
Copy link
Member

GrabYourPitchforks commented Nov 26, 2020

Looks like System.Net.WebSockets.WebSocketProtocol.csproj still references BitOperations.cs? Removing the ifdefs could break that project.

Nevermind - they're referencing their own copy, not the CoreLib copy.

@GrabYourPitchforks
Copy link
Member

Unit test failure might be known issue #24181?

@jkotas jkotas merged commit bf1b48d into dotnet:master Nov 26, 2020
@jkotas jkotas deleted the Sha1ForNonSecretPurposes branch November 26, 2020 16:25
@ghost ghost locked as resolved and limited conversation to collaborators Dec 26, 2020
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.

4 participants