File: go1_21_crypto_elliptic.go

package info (click to toggle)
golang-github-traefik-yaegi 0.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 24,608 kB
  • sloc: sh: 457; makefile: 39
file content (64 lines) | stat: -rw-r--r-- 2,381 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Code generated by 'yaegi extract crypto/elliptic'. DO NOT EDIT.

//go:build go1.21 && !go1.22
// +build go1.21,!go1.22

package stdlib

import (
	"crypto/elliptic"
	"math/big"
	"reflect"
)

func init() {
	Symbols["crypto/elliptic/elliptic"] = map[string]reflect.Value{
		// function, constant and variable definitions
		"GenerateKey":         reflect.ValueOf(elliptic.GenerateKey),
		"Marshal":             reflect.ValueOf(elliptic.Marshal),
		"MarshalCompressed":   reflect.ValueOf(elliptic.MarshalCompressed),
		"P224":                reflect.ValueOf(elliptic.P224),
		"P256":                reflect.ValueOf(elliptic.P256),
		"P384":                reflect.ValueOf(elliptic.P384),
		"P521":                reflect.ValueOf(elliptic.P521),
		"Unmarshal":           reflect.ValueOf(elliptic.Unmarshal),
		"UnmarshalCompressed": reflect.ValueOf(elliptic.UnmarshalCompressed),

		// type definitions
		"Curve":       reflect.ValueOf((*elliptic.Curve)(nil)),
		"CurveParams": reflect.ValueOf((*elliptic.CurveParams)(nil)),

		// interface wrapper definitions
		"_Curve": reflect.ValueOf((*_crypto_elliptic_Curve)(nil)),
	}
}

// _crypto_elliptic_Curve is an interface wrapper for Curve type
type _crypto_elliptic_Curve struct {
	IValue          interface{}
	WAdd            func(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int)
	WDouble         func(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int)
	WIsOnCurve      func(x *big.Int, y *big.Int) bool
	WParams         func() *elliptic.CurveParams
	WScalarBaseMult func(k []byte) (x *big.Int, y *big.Int)
	WScalarMult     func(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int)
}

func (W _crypto_elliptic_Curve) Add(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int) {
	return W.WAdd(x1, y1, x2, y2)
}
func (W _crypto_elliptic_Curve) Double(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int) {
	return W.WDouble(x1, y1)
}
func (W _crypto_elliptic_Curve) IsOnCurve(x *big.Int, y *big.Int) bool {
	return W.WIsOnCurve(x, y)
}
func (W _crypto_elliptic_Curve) Params() *elliptic.CurveParams {
	return W.WParams()
}
func (W _crypto_elliptic_Curve) ScalarBaseMult(k []byte) (x *big.Int, y *big.Int) {
	return W.WScalarBaseMult(k)
}
func (W _crypto_elliptic_Curve) ScalarMult(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int) {
	return W.WScalarMult(x1, y1, k)
}