Skip to content

Conversation

PranavSenthilnathan
Copy link
Member

Follow up items from previous PRs:

  • Use RandomNumberGenerator.Fill extension method added in a recent PR
  • Move AssertKeyEquals to a separate helper class
  • Use camel case instead of pascal case for local variables

@PranavSenthilnathan PranavSenthilnathan self-assigned this Jul 19, 2025
@Copilot Copilot AI review requested due to automatic review settings July 19, 2025 08:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements several refactoring improvements to the cryptography test infrastructure as mentioned in the description:

  • Updates test code to use RandomNumberGenerator.Fill extension method instead of custom implementation
  • Migrates AssertKeyEquals functionality from ImportExport.Shared.cs to a dedicated RSATestHelpers class
  • Standardizes local variable naming from Pascal case to camel case in test methods

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
X509Certificate2PemTests.cs Updates local variable names from Pascal case to camel case in test loops
CngHelpers.cs (Common/src) Removes conditional compilation, uses RandomNumberGenerator.Fill consistently
CngHelpers.cs (Microsoft.Bcl.Cryptography) Removes entire file containing custom random bytes implementation
RSATestHelpers.cs Renames class from ImportExport to RSATestHelpers and removes TODO comment
Multiple test files Updates references from ImportExport.AssertKeyEquals to RSATestHelpers.AssertKeyEquals
Multiple .csproj files Updates project references from ImportExport.Shared.cs to RSATestHelpers.cs

Copy link
Contributor

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

@PranavSenthilnathan
Copy link
Member Author

/ba-g #117854 #117772

@PranavSenthilnathan PranavSenthilnathan merged commit d817f03 into dotnet:main Jul 20, 2025
84 of 89 checks passed
@PranavSenthilnathan PranavSenthilnathan deleted the crypto-refactoring branch July 20, 2025 03:05
@github-actions github-actions bot locked and limited conversation to collaborators Aug 19, 2025
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.

2 participants