1// Code generated by 'yaegi extract crypto'. DO NOT EDIT.
2
3// +build go1.16,!go1.17
4
5package stdlib
6
7import (
8	"crypto"
9	"io"
10	"reflect"
11)
12
13func init() {
14	Symbols["crypto/crypto"] = map[string]reflect.Value{
15		// function, constant and variable definitions
16		"BLAKE2b_256":  reflect.ValueOf(crypto.BLAKE2b_256),
17		"BLAKE2b_384":  reflect.ValueOf(crypto.BLAKE2b_384),
18		"BLAKE2b_512":  reflect.ValueOf(crypto.BLAKE2b_512),
19		"BLAKE2s_256":  reflect.ValueOf(crypto.BLAKE2s_256),
20		"MD4":          reflect.ValueOf(crypto.MD4),
21		"MD5":          reflect.ValueOf(crypto.MD5),
22		"MD5SHA1":      reflect.ValueOf(crypto.MD5SHA1),
23		"RIPEMD160":    reflect.ValueOf(crypto.RIPEMD160),
24		"RegisterHash": reflect.ValueOf(crypto.RegisterHash),
25		"SHA1":         reflect.ValueOf(crypto.SHA1),
26		"SHA224":       reflect.ValueOf(crypto.SHA224),
27		"SHA256":       reflect.ValueOf(crypto.SHA256),
28		"SHA384":       reflect.ValueOf(crypto.SHA384),
29		"SHA3_224":     reflect.ValueOf(crypto.SHA3_224),
30		"SHA3_256":     reflect.ValueOf(crypto.SHA3_256),
31		"SHA3_384":     reflect.ValueOf(crypto.SHA3_384),
32		"SHA3_512":     reflect.ValueOf(crypto.SHA3_512),
33		"SHA512":       reflect.ValueOf(crypto.SHA512),
34		"SHA512_224":   reflect.ValueOf(crypto.SHA512_224),
35		"SHA512_256":   reflect.ValueOf(crypto.SHA512_256),
36
37		// type definitions
38		"Decrypter":     reflect.ValueOf((*crypto.Decrypter)(nil)),
39		"DecrypterOpts": reflect.ValueOf((*crypto.DecrypterOpts)(nil)),
40		"Hash":          reflect.ValueOf((*crypto.Hash)(nil)),
41		"PrivateKey":    reflect.ValueOf((*crypto.PrivateKey)(nil)),
42		"PublicKey":     reflect.ValueOf((*crypto.PublicKey)(nil)),
43		"Signer":        reflect.ValueOf((*crypto.Signer)(nil)),
44		"SignerOpts":    reflect.ValueOf((*crypto.SignerOpts)(nil)),
45
46		// interface wrapper definitions
47		"_Decrypter":     reflect.ValueOf((*_crypto_Decrypter)(nil)),
48		"_DecrypterOpts": reflect.ValueOf((*_crypto_DecrypterOpts)(nil)),
49		"_PrivateKey":    reflect.ValueOf((*_crypto_PrivateKey)(nil)),
50		"_PublicKey":     reflect.ValueOf((*_crypto_PublicKey)(nil)),
51		"_Signer":        reflect.ValueOf((*_crypto_Signer)(nil)),
52		"_SignerOpts":    reflect.ValueOf((*_crypto_SignerOpts)(nil)),
53	}
54}
55
56// _crypto_Decrypter is an interface wrapper for Decrypter type
57type _crypto_Decrypter struct {
58	IValue   interface{}
59	WDecrypt func(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error)
60	WPublic  func() crypto.PublicKey
61}
62
63func (W _crypto_Decrypter) Decrypt(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) {
64	return W.WDecrypt(rand, msg, opts)
65}
66func (W _crypto_Decrypter) Public() crypto.PublicKey {
67	return W.WPublic()
68}
69
70// _crypto_DecrypterOpts is an interface wrapper for DecrypterOpts type
71type _crypto_DecrypterOpts struct {
72	IValue interface{}
73}
74
75// _crypto_PrivateKey is an interface wrapper for PrivateKey type
76type _crypto_PrivateKey struct {
77	IValue interface{}
78}
79
80// _crypto_PublicKey is an interface wrapper for PublicKey type
81type _crypto_PublicKey struct {
82	IValue interface{}
83}
84
85// _crypto_Signer is an interface wrapper for Signer type
86type _crypto_Signer struct {
87	IValue  interface{}
88	WPublic func() crypto.PublicKey
89	WSign   func(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)
90}
91
92func (W _crypto_Signer) Public() crypto.PublicKey {
93	return W.WPublic()
94}
95func (W _crypto_Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) {
96	return W.WSign(rand, digest, opts)
97}
98
99// _crypto_SignerOpts is an interface wrapper for SignerOpts type
100type _crypto_SignerOpts struct {
101	IValue    interface{}
102	WHashFunc func() crypto.Hash
103}
104
105func (W _crypto_SignerOpts) HashFunc() crypto.Hash {
106	return W.WHashFunc()
107}
108