Skip to content

Conversation

@ATimmeh33
Copy link
Collaborator

@ATimmeh33 ATimmeh33 commented Sep 26, 2025

Based on #153

@ATimmeh33 ATimmeh33 added this to the SemVer 5.0 milestone Sep 26, 2025
@ATimmeh33 ATimmeh33 requested a review from Copilot September 26, 2025 17:29
Copy link

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 removes support for unsupported hash algorithms for file digest functionality, limiting the available algorithms to SHA-256 and SHA-512 while migrating from string-based to enum-based algorithm specification.

  • Changed the target framework from .NET Standard 1.4 to .NET 8.0
  • Replaced string-based hash algorithm specification with a strongly-typed enum
  • Removed support for SHA-1 and SHA-384 algorithms, keeping only SHA-256 and SHA-512

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/signhost.ruleset Added rule to disable StyleCop warning for closing parenthesis spacing
src/SignhostAPIClient/SignhostAPIClient.csproj Updated target frameworks and removed .NET Standard 1.4 dependencies
src/SignhostAPIClient/Rest/StreamContentDigestOptionsExtensions.cs Refactored to use enum-based algorithm selection and simplified hash creation
src/SignhostAPIClient/Rest/FileDigestOptions.cs Changed DigestHashAlgorithm property from string to enum type
src/SignhostAPIClient/Rest/DigestHashAlgorithmNames.cs Added new enum defining supported hash algorithms
src/SignhostAPIClient.Tests/SignhostApiClientTests.cs Updated tests to use new enum values instead of string literals

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Modernizes the codebase by upgrading to .NET 10, enabling use of newer language features and APIs.
Removes legacy netstandard1.4 support and related conditional logic to simplify maintenance.
Improves compatibility with future .NET releases.
- Replaced Newtonsoft.Json with System.Text.Json for JSON serialization and deserialization across the API client.
- Updated interfaces and classes to reflect consistent naming conventions (e.g., ISignHostApiClient to ISignhostApiClient).
- Removed obsolete JsonConverter classes that were specific to Newtonsoft.Json.
- Introduced centralized JSON serializer options in SignhostJsonSerializerOptions for consistent serialization behavior.
- Added new JSON test resources for various transaction scenarios to ensure compatibility with the updated serialization logic.
Also refactor file digest options to use enum for hash algorithms and update related tests
@ATimmeh33 ATimmeh33 force-pushed the fix/remove-unsupported-hash-algs-for-file-digest branch from 664c4d5 to 0789abb Compare November 21, 2025 18:25
@ATimmeh33
Copy link
Collaborator Author

Cherry-picked in #162

@ATimmeh33 ATimmeh33 closed this Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants