github.com/traefik/yaegi@v0.15.1/stdlib/go1_20_hash.go (about) 1 // Code generated by 'yaegi extract hash'. DO NOT EDIT. 2 3 //go:build go1.20 4 // +build go1.20 5 6 package stdlib 7 8 import ( 9 "hash" 10 "reflect" 11 ) 12 13 func init() { 14 Symbols["hash/hash"] = map[string]reflect.Value{ 15 // type definitions 16 "Hash": reflect.ValueOf((*hash.Hash)(nil)), 17 "Hash32": reflect.ValueOf((*hash.Hash32)(nil)), 18 "Hash64": reflect.ValueOf((*hash.Hash64)(nil)), 19 20 // interface wrapper definitions 21 "_Hash": reflect.ValueOf((*_hash_Hash)(nil)), 22 "_Hash32": reflect.ValueOf((*_hash_Hash32)(nil)), 23 "_Hash64": reflect.ValueOf((*_hash_Hash64)(nil)), 24 } 25 } 26 27 // _hash_Hash is an interface wrapper for Hash type 28 type _hash_Hash struct { 29 IValue interface{} 30 WBlockSize func() int 31 WReset func() 32 WSize func() int 33 WSum func(b []byte) []byte 34 WWrite func(p []byte) (n int, err error) 35 } 36 37 func (W _hash_Hash) BlockSize() int { 38 return W.WBlockSize() 39 } 40 func (W _hash_Hash) Reset() { 41 W.WReset() 42 } 43 func (W _hash_Hash) Size() int { 44 return W.WSize() 45 } 46 func (W _hash_Hash) Sum(b []byte) []byte { 47 return W.WSum(b) 48 } 49 func (W _hash_Hash) Write(p []byte) (n int, err error) { 50 return W.WWrite(p) 51 } 52 53 // _hash_Hash32 is an interface wrapper for Hash32 type 54 type _hash_Hash32 struct { 55 IValue interface{} 56 WBlockSize func() int 57 WReset func() 58 WSize func() int 59 WSum func(b []byte) []byte 60 WSum32 func() uint32 61 WWrite func(p []byte) (n int, err error) 62 } 63 64 func (W _hash_Hash32) BlockSize() int { 65 return W.WBlockSize() 66 } 67 func (W _hash_Hash32) Reset() { 68 W.WReset() 69 } 70 func (W _hash_Hash32) Size() int { 71 return W.WSize() 72 } 73 func (W _hash_Hash32) Sum(b []byte) []byte { 74 return W.WSum(b) 75 } 76 func (W _hash_Hash32) Sum32() uint32 { 77 return W.WSum32() 78 } 79 func (W _hash_Hash32) Write(p []byte) (n int, err error) { 80 return W.WWrite(p) 81 } 82 83 // _hash_Hash64 is an interface wrapper for Hash64 type 84 type _hash_Hash64 struct { 85 IValue interface{} 86 WBlockSize func() int 87 WReset func() 88 WSize func() int 89 WSum func(b []byte) []byte 90 WSum64 func() uint64 91 WWrite func(p []byte) (n int, err error) 92 } 93 94 func (W _hash_Hash64) BlockSize() int { 95 return W.WBlockSize() 96 } 97 func (W _hash_Hash64) Reset() { 98 W.WReset() 99 } 100 func (W _hash_Hash64) Size() int { 101 return W.WSize() 102 } 103 func (W _hash_Hash64) Sum(b []byte) []byte { 104 return W.WSum(b) 105 } 106 func (W _hash_Hash64) Sum64() uint64 { 107 return W.WSum64() 108 } 109 func (W _hash_Hash64) Write(p []byte) (n int, err error) { 110 return W.WWrite(p) 111 }