github.com/goplus/igop@v0.25.0/pkg/crypto/sha256/go117_export.go (about)

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //go:build go1.17 && !go1.18
     4  // +build go1.17,!go1.18
     5  
     6  package sha256
     7  
     8  import (
     9  	q "crypto/sha256"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/igop"
    15  )
    16  
    17  func init() {
    18  	igop.RegisterPackage(&igop.Package{
    19  		Name: "sha256",
    20  		Path: "crypto/sha256",
    21  		Deps: map[string]string{
    22  			"crypto":          "crypto",
    23  			"encoding/binary": "binary",
    24  			"errors":          "errors",
    25  			"hash":            "hash",
    26  			"internal/cpu":    "cpu",
    27  			"math/bits":       "bits",
    28  		},
    29  		Interfaces: map[string]reflect.Type{},
    30  		NamedTypes: map[string]reflect.Type{},
    31  		AliasTypes: map[string]reflect.Type{},
    32  		Vars:       map[string]reflect.Value{},
    33  		Funcs: map[string]reflect.Value{
    34  			"New":    reflect.ValueOf(q.New),
    35  			"New224": reflect.ValueOf(q.New224),
    36  			"Sum224": reflect.ValueOf(q.Sum224),
    37  			"Sum256": reflect.ValueOf(q.Sum256),
    38  		},
    39  		TypedConsts: map[string]igop.TypedConst{},
    40  		UntypedConsts: map[string]igop.UntypedConst{
    41  			"BlockSize": {"untyped int", constant.MakeInt64(int64(q.BlockSize))},
    42  			"Size":      {"untyped int", constant.MakeInt64(int64(q.Size))},
    43  			"Size224":   {"untyped int", constant.MakeInt64(int64(q.Size224))},
    44  		},
    45  	})
    46  }