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

     1  // export by github.com/goplus/igop/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/igop"
    14  )
    15  
    16  func init() {
    17  	igop.RegisterPackage(&igop.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]reflect.Type{
    32  			"PrivateKey": reflect.TypeOf((*q.PrivateKey)(nil)).Elem(),
    33  			"PublicKey":  reflect.TypeOf((*q.PublicKey)(nil)).Elem(),
    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]igop.TypedConst{},
    44  		UntypedConsts: map[string]igop.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  }