https://github.com/mtchavez/jenkins
Golang Jenkins Hash
https://github.com/mtchavez/jenkins
go hashing jenkins
Last synced: 5 months ago
JSON representation
Golang Jenkins Hash
- Host: GitHub
- URL: https://github.com/mtchavez/jenkins
- Owner: mtchavez
- License: mit
- Created: 2013-04-29T02:45:15.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2017-08-27T23:31:24.000Z (almost 9 years ago)
- Last Synced: 2025-10-11T04:48:01.770Z (9 months ago)
- Topics: go, hashing, jenkins
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Jenkins Hash
[](https://github.com/mtchavez/jenkins/releases)
[](https://travis-ci.org/mtchavez/jenkins)
[](http://godoc.org/github.com/mtchavez/jenkins)
[](https://coveralls.io/github/mtchavez/jenkins)
[](https://goreportcard.com/report/github.com/mtchavez/jenkins)
Golang Jenkins hash
## Install
`go get -u github.com/mtchavez/jenkins`
## Usage
Jenkins conforms to the [Hash32](http://golang.org/pkg/hash/#Hash32) interface from the Go standard library
```go
// Create a new hash
jenkhash := New()
// Write a string of bytes to hash
key := []byte("my-random-key")
length, err := jenkhash(key)
// Get uint32 sum of hash
sum := jenkhash.Sum32()
// Sum hash with byte string
sumbytes := jenkhash.Sum(key)
```
## Testing
Uses [Ginkgo][ginkgo] and [Gomega][gomega] for testing.
Run via `make test` which will run `go test -cover`
## Documentation
Docs on [godoc](http://godoc.org/github.com/mtchavez/jenkins)
[ginkgo]: https://github.com/onsi/ginkgo
[gomega]: https://github.com/onsi/gomega