Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cyberdelia/treehash

A SHA256 Tree Hash implementation in Go
https://github.com/cyberdelia/treehash

Last synced: 29 days ago
JSON representation

A SHA256 Tree Hash implementation in Go

Awesome Lists containing this project

README

        

# 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 :

```go
import "github.com/cyberdelia/treehash"
```

## Use

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