github.com/switchupcb/yaegi@v0.10.2/stdlib/go1_16_hash.go (about)

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