Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

file: Introduce filehasher subcomponent #2116

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

nolash
Copy link
Contributor

@nolash nolash commented Feb 24, 2020

This PR is part of a series of PRs that introduces an interface that allows chaining of components that receive a data stream and generate hashes and intermediate Merkle-Tree chunks. The individual PR steps will be partitioned from #2022 (branch https://github.com/nolash/swarm/tree/filehasher-avenged ) as follows:

  1. Introduce SectionWriter, implement this interface in bmt, make AsyncHasher standalone
  2. Move AsyncHasher to file/hasher
  3. Add reference implementation of the Filehasher algorithm
  4. Add implementation of SectionWriter sub-component for hashing intermediate Merkle Tree levels (this PR)
  5. Add implementation of SectionWriter component executing the FileHasher algorithm
  6. Add a "splitter" that bridges io.Reader and SectionWriter, and an implementation of SectionWriter component that provides Chunk output.
  7. Add implementation of SectionWriter that provides encryption, along with a test utility SectionWriter implentation of a data cache.
  8. Evaluate and prune bmt.Hasher exports wtr AsyncHasher

@nolash nolash requested a review from zelig April 2, 2020 07:32
@nolash nolash requested a review from jmozah April 2, 2020 07:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant