diff options
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index b79009c6778..e11d2c41bc6 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -134,21 +134,33 @@ public: const char *func_name() const { return "from_base64"; } }; +#include <my_crypt.h> -class Item_func_aes_encrypt :public Item_str_func +class Item_aes_crypt :public Item_str_func { + enum { AES_KEY_LENGTH = 128 }; + void create_key(String *user_key, uchar* key); + +protected: + my_aes_encrypt_dynamic_type crypt; + public: - Item_func_aes_encrypt(Item *a, Item *b) :Item_str_func(a,b) {} + Item_aes_crypt(Item *a, Item *b) :Item_str_func(a,b) {} String *val_str(String *); +}; + +class Item_func_aes_encrypt :public Item_aes_crypt +{ +public: + Item_func_aes_encrypt(Item *a, Item *b) :Item_aes_crypt(a,b) {} void fix_length_and_dec(); const char *func_name() const { return "aes_encrypt"; } }; -class Item_func_aes_decrypt :public Item_str_func +class Item_func_aes_decrypt :public Item_aes_crypt { public: - Item_func_aes_decrypt(Item *a, Item *b) :Item_str_func(a,b) {} - String *val_str(String *); + Item_func_aes_decrypt(Item *a, Item *b) :Item_aes_crypt(a,b) {} void fix_length_and_dec(); const char *func_name() const { return "aes_decrypt"; } }; |