Skip to content

refactor: use HexFormat for digest encoding#772

Merged
hectorvent merged 1 commit into
floci-io:mainfrom
codingkiddo:refactor/use-hexformat-for-digests
May 12, 2026
Merged

refactor: use HexFormat for digest encoding#772
hectorvent merged 1 commit into
floci-io:mainfrom
codingkiddo:refactor/use-hexformat-for-digests

Conversation

@codingkiddo

Copy link
Copy Markdown
Contributor

Summary

Replaces manual byte-to-hex conversion using StringBuilder and String.format("%02x", ...) with the standard JDK HexFormat API.

This keeps the same lowercase/no-delimiter hex output while making the digest encoding code simpler and more readable.

Why

Floci targets modern Java, so HexFormat is available and is a better fit for byte-to-hex conversion than manually formatting each byte.

Testing

  • ./mvnw clean package -DskipTests
  • ./mvnw test -Dtest=ApiGatewayAuthorizerContextIntegrationTest
  • ./mvnw test

Full test result:

Tests run: 4118, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS

Signed-off-by: Vinod Kumar <codingkiddo@gmail.com>
@hectorvent hectorvent added enhancement New feature or request labels May 11, 2026

@hectorvent hectorvent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @codingkiddo,

Thank you for your contribution.

@hectorvent hectorvent merged commit c87abb0 into floci-io:main May 12, 2026
10 checks passed
@codingkiddo

Copy link
Copy Markdown
Contributor Author

Thank you for the review and quick merge @hectorvent... Happy to contribute to Floci, and I’ll continue exploring the project for more focused improvements.

Arthur-0896 pushed a commit to Arthur-0896/floci that referenced this pull request May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants