leb.io/aeshash@v0.1.2/aeshashCompat.go (about) 1 package aeshash 2 3 import ( 4 "leb.io/hashland/nhash" 5 ) 6 7 // nhash compatible interface 8 func NewAES(seed uint64) nhash.Hash64 { 9 s := n(seed) 10 return s 11 } 12 13 func (s *State) Hash64(b []byte, seeds ...uint64) uint64 { 14 switch len(seeds) { 15 case 1: 16 s.seed = seeds[0] 17 } 18 s.hash = Hash(b, s.seed) 19 //fmt.Printf("pc=0x%08x, pb=0x%08x\n", d.pc, d.pb) 20 return s.hash 21 } 22 23 //func Hash(p unsafe.Pointer, s, h uintptr) uintptr 24 //func HashStr(p string, s, h uintptr) uintptr 25 //func aeshash(p unsafe.Pointer, s, h uintptr) uintptr 26 //func aeshash32(p unsafe.Pointer, s, h uintptr) uintptr 27 //func aeshash64(p unsafe.Pointer, s, h uintptr) uintptr 28 //func aeshashstr(p unsafe.Pointer, s, h uintptr) uintptr