github.com/goplus/igop@v0.25.0/pkg/crypto/rsa/go114_export.go (about)

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //+build go1.14,!go1.15
     4  
     5  package rsa
     6  
     7  import (
     8  	q "crypto/rsa"
     9  
    10  	"go/constant"
    11  	"reflect"
    12  
    13  	"github.com/goplus/igop"
    14  )
    15  
    16  func init() {
    17  	igop.RegisterPackage(&igop.Package{
    18  		Name: "rsa",
    19  		Path: "crypto/rsa",
    20  		Deps: map[string]string{
    21  			"bytes":                    "bytes",
    22  			"crypto":                   "crypto",
    23  			"crypto/internal/randutil": "randutil",
    24  			"crypto/rand":              "rand",
    25  			"crypto/subtle":            "subtle",
    26  			"errors":                   "errors",
    27  			"hash":                     "hash",
    28  			"io":                       "io",
    29  			"math":                     "math",
    30  			"math/big":                 "big",
    31  		},
    32  		Interfaces: map[string]reflect.Type{},
    33  		NamedTypes: map[string]reflect.Type{
    34  			"CRTValue":               reflect.TypeOf((*q.CRTValue)(nil)).Elem(),
    35  			"OAEPOptions":            reflect.TypeOf((*q.OAEPOptions)(nil)).Elem(),
    36  			"PKCS1v15DecryptOptions": reflect.TypeOf((*q.PKCS1v15DecryptOptions)(nil)).Elem(),
    37  			"PSSOptions":             reflect.TypeOf((*q.PSSOptions)(nil)).Elem(),
    38  			"PrecomputedValues":      reflect.TypeOf((*q.PrecomputedValues)(nil)).Elem(),
    39  			"PrivateKey":             reflect.TypeOf((*q.PrivateKey)(nil)).Elem(),
    40  			"PublicKey":              reflect.TypeOf((*q.PublicKey)(nil)).Elem(),
    41  		},
    42  		AliasTypes: map[string]reflect.Type{},
    43  		Vars: map[string]reflect.Value{
    44  			"ErrDecryption":     reflect.ValueOf(&q.ErrDecryption),
    45  			"ErrMessageTooLong": reflect.ValueOf(&q.ErrMessageTooLong),
    46  			"ErrVerification":   reflect.ValueOf(&q.ErrVerification),
    47  		},
    48  		Funcs: map[string]reflect.Value{
    49  			"DecryptOAEP":               reflect.ValueOf(q.DecryptOAEP),
    50  			"DecryptPKCS1v15":           reflect.ValueOf(q.DecryptPKCS1v15),
    51  			"DecryptPKCS1v15SessionKey": reflect.ValueOf(q.DecryptPKCS1v15SessionKey),
    52  			"EncryptOAEP":               reflect.ValueOf(q.EncryptOAEP),
    53  			"EncryptPKCS1v15":           reflect.ValueOf(q.EncryptPKCS1v15),
    54  			"GenerateKey":               reflect.ValueOf(q.GenerateKey),
    55  			"GenerateMultiPrimeKey":     reflect.ValueOf(q.GenerateMultiPrimeKey),
    56  			"SignPKCS1v15":              reflect.ValueOf(q.SignPKCS1v15),
    57  			"SignPSS":                   reflect.ValueOf(q.SignPSS),
    58  			"VerifyPKCS1v15":            reflect.ValueOf(q.VerifyPKCS1v15),
    59  			"VerifyPSS":                 reflect.ValueOf(q.VerifyPSS),
    60  		},
    61  		TypedConsts: map[string]igop.TypedConst{},
    62  		UntypedConsts: map[string]igop.UntypedConst{
    63  			"PSSSaltLengthAuto":       {"untyped int", constant.MakeInt64(int64(q.PSSSaltLengthAuto))},
    64  			"PSSSaltLengthEqualsHash": {"untyped int", constant.MakeInt64(int64(q.PSSSaltLengthEqualsHash))},
    65  		},
    66  	})
    67  }