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

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //go:build go1.21
     4  // +build go1.21
     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  			"crypto/subtle":                "subtle",
    28  			"errors":                       "errors",
    29  			"io":                           "io",
    30  			"strconv":                      "strconv",
    31  		},
    32  		Interfaces: map[string]reflect.Type{},
    33  		NamedTypes: map[string]reflect.Type{
    34  			"Options":    reflect.TypeOf((*q.Options)(nil)).Elem(),
    35  			"PrivateKey": reflect.TypeOf((*q.PrivateKey)(nil)).Elem(),
    36  			"PublicKey":  reflect.TypeOf((*q.PublicKey)(nil)).Elem(),
    37  		},
    38  		AliasTypes: map[string]reflect.Type{},
    39  		Vars:       map[string]reflect.Value{},
    40  		Funcs: map[string]reflect.Value{
    41  			"GenerateKey":       reflect.ValueOf(q.GenerateKey),
    42  			"NewKeyFromSeed":    reflect.ValueOf(q.NewKeyFromSeed),
    43  			"Sign":              reflect.ValueOf(q.Sign),
    44  			"Verify":            reflect.ValueOf(q.Verify),
    45  			"VerifyWithOptions": reflect.ValueOf(q.VerifyWithOptions),
    46  		},
    47  		TypedConsts: map[string]igop.TypedConst{},
    48  		UntypedConsts: map[string]igop.UntypedConst{
    49  			"PrivateKeySize": {"untyped int", constant.MakeInt64(int64(q.PrivateKeySize))},
    50  			"PublicKeySize":  {"untyped int", constant.MakeInt64(int64(q.PublicKeySize))},
    51  			"SeedSize":       {"untyped int", constant.MakeInt64(int64(q.SeedSize))},
    52  			"SignatureSize":  {"untyped int", constant.MakeInt64(int64(q.SignatureSize))},
    53  		},
    54  	})
    55  }