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

Incremental hashing / signing #7

Open
Gozala opened this issue Jul 20, 2023 · 0 comments
Open

Incremental hashing / signing #7

Gozala opened this issue Jul 20, 2023 · 0 comments

Comments

@Gozala
Copy link

Gozala commented Jul 20, 2023

APIs proposed here address the problem of hashing / signing / verifying content that is too large to hold in memory, which is great. Unfortunately it does not address use cases where you need to do those operations incrementally e.g. when large stream of data is transferred over some channel you may want to send checksums along the way.

With the drafted API it would require replaying all the previous bytes. In contrast node's crypto APIs provide you with .copy() method on a hasher so you can continue writing into hasher.

Perhaps something along the same lines could be done here as well, e.g. instead of hashing / signing / verifying readable stream, one could create hasher / signer / verifier instance from readable stream, with a method method digest / sign / verify to compute result for the bytes that had been written so far.

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