-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Interop\Windows\BCrypt\Cng.cs does not follow the Interop guidelines #14588
Comments
As part of #1739, this commit begins to refactor Cng.cs, starting by pulling out the functionality needed for RandomNumberGenerator. The assembly was being filled with all of the Cng code, when in reality it only needed a very small amount of it. And since the assembly doesn't have any string resources, I also modified the .csproj to suppress the buildtools inclusion of the common resources support. As a result of the removals, this change boosts the code coverage number of System.Security.Cryptography.RandomNumberGenerator.dll from 13% to 96%. (Note that there are still copies of the code in Interop.NTSTATUS.cs in Cng.cs, due to other dependencies in Cng.cs that I didn't want to change. As we refactor Cng.cs further, we can remove those copies.)
@karelz @bartonjs - is there still a need to implement that tickete? If yes, I would be interested to do it. Just to confirm that I understand that correctly - that the file that needs to adapt to guidelines is corefx/src/Common/src/Interop/Windows/BCrypt/Cng.cs The work that needs to be done is:
I'm not sure what do you mean by Interop.MethodCollection.cs - any example of how that should be done? Cheers |
@krwq @GrabYourPitchforks can you provide some guidance while Jeremy is on vacation? |
While "one thing per file" can work, we've been accepting "one file per logical group".
|
awesome, thank you for explaining that to me:) @karelz can you assign me to that ticket - I will be slowly working on it. |
This is now being tracked under more active issues, such as #51564. Closing this redundant copy. |
Cng.cs was ported as-was from closed source into open. It should be broken up into multiple Interop.Method.cs and/or Interop.MethodCollection.cs files, and the SafeHandle types extracted into files of their own right.
The text was updated successfully, but these errors were encountered: