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

variable hash functions testing #161

Merged

Conversation

Jorropo
Copy link
Contributor

@Jorropo Jorropo commented Aug 12, 2022

squashed version of #160

Stebalien and others added 3 commits July 28, 2022 15:43
This makes it possible to register hasher factories that take a size
hint. Such hashers should produce at least the requested number of
bytes, but may:

1. Produce fewer bytes in some cases (e.g., not enough input is available).
2. May produce more bytes (the usual case).

The caller should check the size of the produced digest to determine if
it's sufficient for the caller's use-case (likely truncating it if it's
too large).

NOTE: the convenience `Sum` function will handle size verification and
truncation internally.
@Jorropo Jorropo merged commit 16974ad into multiformats:master Aug 12, 2022
@Jorropo Jorropo deleted the feat/variable-hash-functions-testing branch August 12, 2022 15:46
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.

None yet

3 participants