Categorygithub.com/filecoin-project/go-fil-commp-hashhash
repositorypackage
0.2.0
Repository: https://github.com/filecoin-project/go-fil-commp-hashhash.git
Documentation: pkg.go.dev

# README

go-fil-commp-hashhash

A hash.Hash implementation of fil-commitment-unsealed

GoDoc GoReport

Package commp allows calculating a Filecoin Unsealed Commitment (commP/commD) given a bytestream. It is implemented as a standard hash.Hash() interface, with the entire padding and treebuilding algorithm written in golang.

The returned digest is a 32-byte raw commitment payload. Use something like DataCommitmentV1ToCID in order to convert it to a proper cid.Cid.

The output of this library is 100% identical to ffi.GeneratePieceCIDFromFile()

Lead Maintainer

Peter 'ribasushi' Rabbitson

License

SPDX-License-Identifier: Apache-2.0 OR MIT