Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lafikl/khasher
KHasher is a simple utility to create k number of hashes.
https://github.com/lafikl/khasher
Last synced: about 1 month ago
JSON representation
KHasher is a simple utility to create k number of hashes.
- Host: GitHub
- URL: https://github.com/lafikl/khasher
- Owner: lafikl
- License: mit
- Created: 2016-03-23T21:30:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-03-26T00:10:31.000Z (over 8 years ago)
- Last Synced: 2024-06-20T11:10:51.429Z (5 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# khasher
KHasher is a simple utility to create k number of hashes out of two hash functions only.Which is an implementation of the hashing functions mentioned in [this paper](https://www.eecs.harvard.edu/~michaelm/postscripts/rsa2008.pdf).
A similar algorithm was also mentioned in The Art of Computer Programing Vol.3 Sorting and Searching
In the section of double hashing open adderssing.# Example
```goimport (
"fmt""github.com/lafikl/khasher"
)
func main() {
kh := khasher.NewKHasher(5)
size_of_table := uint32(67)
hashes, err := kh.Hash([]byte("Donald E.K"), size_of_table)
if err != nil {
panic(err)
}
fmt.Println(hashes)
}
```