github.com/switchupcb/yaegi@v0.10.2/stdlib/go1_16_crypto_elliptic.go (about)

     1  // Code generated by 'yaegi extract crypto/elliptic'. DO NOT EDIT.
     2  
     3  // +build go1.16,!go1.17
     4  
     5  package stdlib
     6  
     7  import (
     8  	"crypto/elliptic"
     9  	"math/big"
    10  	"reflect"
    11  )
    12  
    13  func init() {
    14  	Symbols["crypto/elliptic/elliptic"] = map[string]reflect.Value{
    15  		// function, constant and variable definitions
    16  		"GenerateKey":         reflect.ValueOf(elliptic.GenerateKey),
    17  		"Marshal":             reflect.ValueOf(elliptic.Marshal),
    18  		"MarshalCompressed":   reflect.ValueOf(elliptic.MarshalCompressed),
    19  		"P224":                reflect.ValueOf(elliptic.P224),
    20  		"P256":                reflect.ValueOf(elliptic.P256),
    21  		"P384":                reflect.ValueOf(elliptic.P384),
    22  		"P521":                reflect.ValueOf(elliptic.P521),
    23  		"Unmarshal":           reflect.ValueOf(elliptic.Unmarshal),
    24  		"UnmarshalCompressed": reflect.ValueOf(elliptic.UnmarshalCompressed),
    25  
    26  		// type definitions
    27  		"Curve":       reflect.ValueOf((*elliptic.Curve)(nil)),
    28  		"CurveParams": reflect.ValueOf((*elliptic.CurveParams)(nil)),
    29  
    30  		// interface wrapper definitions
    31  		"_Curve": reflect.ValueOf((*_crypto_elliptic_Curve)(nil)),
    32  	}
    33  }
    34  
    35  // _crypto_elliptic_Curve is an interface wrapper for Curve type
    36  type _crypto_elliptic_Curve struct {
    37  	IValue          interface{}
    38  	WAdd            func(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int)
    39  	WDouble         func(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int)
    40  	WIsOnCurve      func(x *big.Int, y *big.Int) bool
    41  	WParams         func() *elliptic.CurveParams
    42  	WScalarBaseMult func(k []byte) (x *big.Int, y *big.Int)
    43  	WScalarMult     func(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int)
    44  }
    45  
    46  func (W _crypto_elliptic_Curve) Add(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int) {
    47  	return W.WAdd(x1, y1, x2, y2)
    48  }
    49  func (W _crypto_elliptic_Curve) Double(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int) {
    50  	return W.WDouble(x1, y1)
    51  }
    52  func (W _crypto_elliptic_Curve) IsOnCurve(x *big.Int, y *big.Int) bool {
    53  	return W.WIsOnCurve(x, y)
    54  }
    55  func (W _crypto_elliptic_Curve) Params() *elliptic.CurveParams {
    56  	return W.WParams()
    57  }
    58  func (W _crypto_elliptic_Curve) ScalarBaseMult(k []byte) (x *big.Int, y *big.Int) {
    59  	return W.WScalarBaseMult(k)
    60  }
    61  func (W _crypto_elliptic_Curve) ScalarMult(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int) {
    62  	return W.WScalarMult(x1, y1, k)
    63  }