github.com/goplus/igop@v0.25.0/pkg/crypto/ed25519/go119_export.go (about)

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //go:build go1.19 && !go1.20
     4  // +build go1.19,!go1.20
     5  
     6  package ed25519
     7  
     8  import (
     9  	q "crypto/ed25519"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/igop"
    15  )
    16  
    17  func init() {
    18  	igop.RegisterPackage(&igop.Package{
    19  		Name: "ed25519",
    20  		Path: "crypto/ed25519",
    21  		Deps: map[string]string{
    22  			"bytes":                        "bytes",
    23  			"crypto":                       "crypto",
    24  			"crypto/internal/edwards25519": "edwards25519",
    25  			"crypto/rand":                  "rand",
    26  			"crypto/sha512":                "sha512",
    27  			"errors":                       "errors",
    28  			"io":                           "io",
    29  			"strconv":                      "strconv",
    30  		},
    31  		Interfaces: map[string]reflect.Type{},
    32  		NamedTypes: map[string]reflect.Type{
    33  			"PrivateKey": reflect.TypeOf((*q.PrivateKey)(nil)).Elem(),
    34  			"PublicKey":  reflect.TypeOf((*q.PublicKey)(nil)).Elem(),
    35  		},
    36  		AliasTypes: map[string]reflect.Type{},
    37  		Vars:       map[string]reflect.Value{},
    38  		Funcs: map[string]reflect.Value{
    39  			"GenerateKey":    reflect.ValueOf(q.GenerateKey),
    40  			"NewKeyFromSeed": reflect.ValueOf(q.NewKeyFromSeed),
    41  			"Sign":           reflect.ValueOf(q.Sign),
    42  			"Verify":         reflect.ValueOf(q.Verify),
    43  		},
    44  		TypedConsts: map[string]igop.TypedConst{},
    45  		UntypedConsts: map[string]igop.UntypedConst{
    46  			"PrivateKeySize": {"untyped int", constant.MakeInt64(int64(q.PrivateKeySize))},
    47  			"PublicKeySize":  {"untyped int", constant.MakeInt64(int64(q.PublicKeySize))},
    48  			"SeedSize":       {"untyped int", constant.MakeInt64(int64(q.SeedSize))},
    49  			"SignatureSize":  {"untyped int", constant.MakeInt64(int64(q.SignatureSize))},
    50  		},
    51  	})
    52  }