| 1 | // Code generated by 'yaegi extract hash'. DO NOT EDIT. |
| 2 | |
| 3 | //go:build go1.22 |
| 4 | // +build go1.22 |
| 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 { return W.WBlockSize() } |
| 38 | func (W _hash_Hash) Reset() { W.WReset() } |
| 39 | func (W _hash_Hash) Size() int { return W.WSize() } |
| 40 | func (W _hash_Hash) Sum(b []byte) []byte { return W.WSum(b) } |
| 41 | func (W _hash_Hash) Write(p []byte) (n int, err error) { return W.WWrite(p) } |
| 42 | |
| 43 | // _hash_Hash32 is an interface wrapper for Hash32 type |
| 44 | type _hash_Hash32 struct { |
| 45 | IValue interface{} |
| 46 | WBlockSize func() int |
| 47 | WReset func() |
| 48 | WSize func() int |
| 49 | WSum func(b []byte) []byte |
| 50 | WSum32 func() uint32 |
| 51 | WWrite func(p []byte) (n int, err error) |
| 52 | } |
| 53 | |
| 54 | func (W _hash_Hash32) BlockSize() int { return W.WBlockSize() } |
| 55 | func (W _hash_Hash32) Reset() { W.WReset() } |
| 56 | func (W _hash_Hash32) Size() int { return W.WSize() } |
| 57 | func (W _hash_Hash32) Sum(b []byte) []byte { return W.WSum(b) } |
| 58 | func (W _hash_Hash32) Sum32() uint32 { return W.WSum32() } |
| 59 | func (W _hash_Hash32) Write(p []byte) (n int, err error) { return W.WWrite(p) } |
| 60 | |
| 61 | // _hash_Hash64 is an interface wrapper for Hash64 type |
| 62 | type _hash_Hash64 struct { |
| 63 | IValue interface{} |
| 64 | WBlockSize func() int |
| 65 | WReset func() |
| 66 | WSize func() int |
| 67 | WSum func(b []byte) []byte |
| 68 | WSum64 func() uint64 |
| 69 | WWrite func(p []byte) (n int, err error) |
| 70 | } |
| 71 | |
| 72 | func (W _hash_Hash64) BlockSize() int { return W.WBlockSize() } |
| 73 | func (W _hash_Hash64) Reset() { W.WReset() } |
| 74 | func (W _hash_Hash64) Size() int { return W.WSize() } |
| 75 | func (W _hash_Hash64) Sum(b []byte) []byte { return W.WSum(b) } |
| 76 | func (W _hash_Hash64) Sum64() uint64 { return W.WSum64() } |
| 77 | func (W _hash_Hash64) Write(p []byte) (n int, err error) { return W.WWrite(p) } |