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

Make cached sha256 of message data available #239

Merged
merged 1 commit into from
May 10, 2022

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented May 9, 2022

Rather than caching the hashCode itself, caches the sha256 of the message content and makes it available via an API. This enables applications using custom seen caches to leverage the same cached sha256 value for collision resistant hashing without having to recalculate the sha256.

Copy link

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

LGTM

@ajsutton ajsutton merged commit 9bd7190 into libp2p:develop May 10, 2022
@ajsutton ajsutton deleted the cache-sha256 branch May 10, 2022 23:24
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.

2 participants