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