github.com/goplus/gossa@v0.3.25/pkg/crypto/ed25519/go116_export.go (about)

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