github.com/joomcode/cue@v0.4.4-0.20221111115225-539fe3512047/pkg/crypto/ed25519/pkg.go (about) 1 // Code generated by go generate. DO NOT EDIT. 2 3 //go:generate rm pkg.go 4 //go:generate go run ../../gen/gen.go 5 6 package ed25519 7 8 import ( 9 "github.com/joomcode/cue/internal/core/adt" 10 "github.com/joomcode/cue/pkg/internal" 11 ) 12 13 func init() { 14 internal.Register("crypto/ed25519", pkg) 15 } 16 17 var _ = adt.TopKind // in case the adt package isn't used 18 19 var pkg = &internal.Package{ 20 Native: []*internal.Builtin{{ 21 Name: "PublicKeySize", 22 Const: "32", 23 }, { 24 Name: "Valid", 25 Params: []internal.Param{ 26 {Kind: adt.BytesKind | adt.StringKind}, 27 {Kind: adt.BytesKind | adt.StringKind}, 28 {Kind: adt.BytesKind | adt.StringKind}, 29 }, 30 Result: adt.BoolKind, 31 Func: func(c *internal.CallCtxt) { 32 publicKey, message, signature := c.Bytes(0), c.Bytes(1), c.Bytes(2) 33 if c.Do() { 34 c.Ret, c.Err = Valid(publicKey, message, signature) 35 } 36 }, 37 }}, 38 }