diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-03-31 19:32:35 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-04-09 18:42:43 +0200 |
commit | bb1b61b312088ba9f5f2cb606594b6f33c284402 (patch) | |
tree | c5b433d19434e194fb82d2407adbbfee759dfd31 /include/my_crypt.h | |
parent | 9ccafffc29526ea30151eb3e62901bfdb77aaf84 (diff) | |
download | mariadb-git-bb1b61b312088ba9f5f2cb606594b6f33c284402.tar.gz |
encryption plugin controls the encryption
* no --encryption-algorithm option anymore
* encrypt/decrypt methods in the encryption plugin
* ecnrypt/decrypt methods in the encryption_km service
* file_km plugin has --file-key-management-encryption-algorithm
* debug_km always uses aes_cbc
* example_km changes between aes_cbc and aes_ecb for different key versions
Diffstat (limited to 'include/my_crypt.h')
-rw-r--r-- | include/my_crypt.h | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/include/my_crypt.h b/include/my_crypt.h index 83665659178..c6cddbd99e3 100644 --- a/include/my_crypt.h +++ b/include/my_crypt.h @@ -26,45 +26,45 @@ C_MODE_START #ifdef HAVE_EncryptAes128Ctr -Crypt_result my_aes_encrypt_ctr(const uchar* source, uint32 source_length, - uchar* dest, uint32* dest_length, - const unsigned char* key, uint8 key_length, - const unsigned char* iv, uint8 iv_length, - uint no_padding); - -Crypt_result my_aes_decrypt_ctr(const uchar* source, uint32 source_length, - uchar* dest, uint32* dest_length, - const unsigned char* key, uint8 key_length, - const unsigned char* iv, uint8 iv_length, - uint no_padding); +int my_aes_encrypt_ctr(const uchar* source, uint source_length, + uchar* dest, uint* dest_length, + const unsigned char* key, uint key_length, + const unsigned char* iv, uint iv_length, + int no_padding); + +int my_aes_decrypt_ctr(const uchar* source, uint source_length, + uchar* dest, uint* dest_length, + const unsigned char* key, uint key_length, + const unsigned char* iv, uint iv_length, + int no_padding); #endif -Crypt_result my_aes_encrypt_cbc(const uchar* source, uint32 source_length, - uchar* dest, uint32* dest_length, - const unsigned char* key, uint8 key_length, - const unsigned char* iv, uint8 iv_length, - uint no_padding); - -Crypt_result my_aes_decrypt_cbc(const uchar* source, uint32 source_length, - uchar* dest, uint32* dest_length, - const unsigned char* key, uint8 key_length, - const unsigned char* iv, uint8 iv_length, - uint no_padding); - -Crypt_result my_aes_encrypt_ecb(const uchar* source, uint32 source_length, - uchar* dest, uint32* dest_length, - const unsigned char* key, uint8 key_length, - const unsigned char* iv, uint8 iv_length, - uint no_padding); - -Crypt_result my_aes_decrypt_ecb(const uchar* source, uint32 source_length, - uchar* dest, uint32* dest_length, - const unsigned char* key, uint8 key_length, - const unsigned char* iv, uint8 iv_length, - uint no_padding); - -Crypt_result my_random_bytes(uchar* buf, int num); +int my_aes_encrypt_cbc(const uchar* source, uint source_length, + uchar* dest, uint* dest_length, + const unsigned char* key, uint key_length, + const unsigned char* iv, uint iv_length, + int no_padding); + +int my_aes_decrypt_cbc(const uchar* source, uint source_length, + uchar* dest, uint* dest_length, + const unsigned char* key, uint key_length, + const unsigned char* iv, uint iv_length, + int no_padding); + +int my_aes_encrypt_ecb(const uchar* source, uint source_length, + uchar* dest, uint* dest_length, + const unsigned char* key, uint key_length, + const unsigned char* iv, uint iv_length, + int no_padding); + +int my_aes_decrypt_ecb(const uchar* source, uint source_length, + uchar* dest, uint* dest_length, + const unsigned char* key, uint key_length, + const unsigned char* iv, uint iv_length, + int no_padding); + +int my_random_bytes(uchar* buf, int num); C_MODE_END |