treehash

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2021 License: MIT Imports: 3 Imported by: 0

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 :

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))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() hash.Hash

New creates a new hash.Hash computing the Tree Hash checksum.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL