/go-hashdir

Hash a directory path

Primary LanguageGo

Build Status Coverage Status

go-hashdir

Simple package for hashing directory strings

package main

import (
	"fmt"
	hashdir "github.com/sger/go-hashdir"
)

func main() {

	// Choose sha1 or sha256 hashing algorithms
	hash, err := hashdir.Create("test/directory", "md5")
	fmt.Println(hash) // returns d41d8cd98f00b204e9800998ecf8427e
}

Testing

$ go test -v

Author

Spiros Gerokostas

License

go-hashdir is available under the MIT license. See the LICENSE file for more info.