cyberdelia / treehash

A SHA256 Tree Hash implementation in Go

Home Page:https://pkg.go.dev/github.com/cyberdelia/treehash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

treehash

treehash implements SHA256 Tree Hash algorithm, notably used by Amazon Glacier.

Installation

Download and install :

$ go get github.com/cyberdelia/treehash

Add it to your code :

import "github.com/cyberdelia/treehash"

Use

file, _ := os.Open("archive.tar.gz")
th := treehash.New()
io.Copy(th, file)
checksum := fmt.Sprintf("%x", th.Sum(nil))

About

A SHA256 Tree Hash implementation in Go

https://pkg.go.dev/github.com/cyberdelia/treehash

License:MIT License


Languages

Language:Go 100.0%