Skip to content

feat/hashregistry#687

Merged
Tabaie merged 4 commits into
masterfrom
feat/hashregistry
May 28, 2025
Merged

feat/hashregistry#687
Tabaie merged 4 commits into
masterfrom
feat/hashregistry

Conversation

@Tabaie
Copy link
Copy Markdown
Contributor

@Tabaie Tabaie commented May 19, 2025

Introduces the ability to look up hashes by string name, and also to register custom functions for testing purposes.

@Tabaie Tabaie requested review from Copilot and ivokub May 19, 2025 19:03
Copy link
Copy Markdown
Contributor

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 adds a registry for hash functions, enabling lookup by string name and registration of custom hash functions for testing purposes. Key changes include:

  • Introducing a new map (hashesByName) and helper functions (findStdHashByName, RegisterCustomHash) in hash/hashes.go.
  • Updating the NewHash function to support both standard and custom hash functions.
  • Optimizing the string handling in ecc/ecc.go by lowercasing the input once.

Reviewed Changes

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

File Description
hash/hashes.go Added hash registry functionality and helper functions for standard/custom hashes.
ecc/ecc.go Adjusted IDFromString to lowercase the input string outside the loop.

Comment thread hash/hashes.go
Copy link
Copy Markdown
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

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

LGTM!

@Tabaie Tabaie merged commit 404f8e5 into master May 28, 2025
6 checks passed
@Tabaie Tabaie deleted the feat/hashregistry branch May 28, 2025 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants