github.com/traefik/yaegi@v0.15.1/stdlib/go1_19_crypto_cipher.go (about) 1 // Code generated by 'yaegi extract crypto/cipher'. DO NOT EDIT. 2 3 //go:build go1.19 && !go1.20 4 // +build go1.19,!go1.20 5 6 package stdlib 7 8 import ( 9 "crypto/cipher" 10 "reflect" 11 ) 12 13 func init() { 14 Symbols["crypto/cipher/cipher"] = map[string]reflect.Value{ 15 // function, constant and variable definitions 16 "NewCBCDecrypter": reflect.ValueOf(cipher.NewCBCDecrypter), 17 "NewCBCEncrypter": reflect.ValueOf(cipher.NewCBCEncrypter), 18 "NewCFBDecrypter": reflect.ValueOf(cipher.NewCFBDecrypter), 19 "NewCFBEncrypter": reflect.ValueOf(cipher.NewCFBEncrypter), 20 "NewCTR": reflect.ValueOf(cipher.NewCTR), 21 "NewGCM": reflect.ValueOf(cipher.NewGCM), 22 "NewGCMWithNonceSize": reflect.ValueOf(cipher.NewGCMWithNonceSize), 23 "NewGCMWithTagSize": reflect.ValueOf(cipher.NewGCMWithTagSize), 24 "NewOFB": reflect.ValueOf(cipher.NewOFB), 25 26 // type definitions 27 "AEAD": reflect.ValueOf((*cipher.AEAD)(nil)), 28 "Block": reflect.ValueOf((*cipher.Block)(nil)), 29 "BlockMode": reflect.ValueOf((*cipher.BlockMode)(nil)), 30 "Stream": reflect.ValueOf((*cipher.Stream)(nil)), 31 "StreamReader": reflect.ValueOf((*cipher.StreamReader)(nil)), 32 "StreamWriter": reflect.ValueOf((*cipher.StreamWriter)(nil)), 33 34 // interface wrapper definitions 35 "_AEAD": reflect.ValueOf((*_crypto_cipher_AEAD)(nil)), 36 "_Block": reflect.ValueOf((*_crypto_cipher_Block)(nil)), 37 "_BlockMode": reflect.ValueOf((*_crypto_cipher_BlockMode)(nil)), 38 "_Stream": reflect.ValueOf((*_crypto_cipher_Stream)(nil)), 39 } 40 } 41 42 // _crypto_cipher_AEAD is an interface wrapper for AEAD type 43 type _crypto_cipher_AEAD struct { 44 IValue interface{} 45 WNonceSize func() int 46 WOpen func(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error) 47 WOverhead func() int 48 WSeal func(dst []byte, nonce []byte, plaintext []byte, additionalData []byte) []byte 49 } 50 51 func (W _crypto_cipher_AEAD) NonceSize() int { 52 return W.WNonceSize() 53 } 54 func (W _crypto_cipher_AEAD) Open(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error) { 55 return W.WOpen(dst, nonce, ciphertext, additionalData) 56 } 57 func (W _crypto_cipher_AEAD) Overhead() int { 58 return W.WOverhead() 59 } 60 func (W _crypto_cipher_AEAD) Seal(dst []byte, nonce []byte, plaintext []byte, additionalData []byte) []byte { 61 return W.WSeal(dst, nonce, plaintext, additionalData) 62 } 63 64 // _crypto_cipher_Block is an interface wrapper for Block type 65 type _crypto_cipher_Block struct { 66 IValue interface{} 67 WBlockSize func() int 68 WDecrypt func(dst []byte, src []byte) 69 WEncrypt func(dst []byte, src []byte) 70 } 71 72 func (W _crypto_cipher_Block) BlockSize() int { 73 return W.WBlockSize() 74 } 75 func (W _crypto_cipher_Block) Decrypt(dst []byte, src []byte) { 76 W.WDecrypt(dst, src) 77 } 78 func (W _crypto_cipher_Block) Encrypt(dst []byte, src []byte) { 79 W.WEncrypt(dst, src) 80 } 81 82 // _crypto_cipher_BlockMode is an interface wrapper for BlockMode type 83 type _crypto_cipher_BlockMode struct { 84 IValue interface{} 85 WBlockSize func() int 86 WCryptBlocks func(dst []byte, src []byte) 87 } 88 89 func (W _crypto_cipher_BlockMode) BlockSize() int { 90 return W.WBlockSize() 91 } 92 func (W _crypto_cipher_BlockMode) CryptBlocks(dst []byte, src []byte) { 93 W.WCryptBlocks(dst, src) 94 } 95 96 // _crypto_cipher_Stream is an interface wrapper for Stream type 97 type _crypto_cipher_Stream struct { 98 IValue interface{} 99 WXORKeyStream func(dst []byte, src []byte) 100 } 101 102 func (W _crypto_cipher_Stream) XORKeyStream(dst []byte, src []byte) { 103 W.WXORKeyStream(dst, src) 104 }