Skip to content

cyberdelia/treehash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages