Skip to content
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

Utility function for comparing hashes #264

Closed
mattyg opened this issue Jul 24, 2024 · 1 comment
Closed

Utility function for comparing hashes #264

mattyg opened this issue Jul 24, 2024 · 1 comment

Comments

@mattyg
Copy link
Member

mattyg commented Jul 24, 2024

I would like a utility function to compare 2 hashes.

I've been using isEqual from lodash but discovered an edge case yesterday where it doesn't work: after round-tripping a dna hash to base64 and back, it will incorrectly consider 2 equivalent hashes not equal.

It seems like everyone has their own implementation of hash comparison in their own libs or apps. For example:

We should make a canonical one and include it in the client lib. Maybe after some profiling to find the most efficient implementation.

@mattyg
Copy link
Member Author

mattyg commented Sep 26, 2024

isEqual still works -- the issue was caused by #265

@mattyg mattyg closed this as completed Sep 26, 2024
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

No branches or pull requests

1 participant