Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cyberdelia/treehash
- Owner: cyberdelia
- License: mit
- Created: 2012-08-23T17:56:29.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2021-08-08T00:10:53.000Z (over 3 years ago)
- Last Synced: 2024-06-20T06:23:23.925Z (5 months ago)
- Language: Go
- Homepage: https://pkg.go.dev/github.com/cyberdelia/treehash
- Size: 4.88 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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))
```