diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-03-26 17:16:37 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-04-05 13:14:37 +0200 |
commit | 6a7ee5a5a540f2c69c8b56448e06098d368ecdb4 (patch) | |
tree | 92cf8574a44eb226b791492dd5c6c3e512e8eafb /include/my_aes.h | |
parent | 87604c4cadac0c9f86068d7f0075bb3cdeabdf0b (diff) | |
download | mariadb-git-6a7ee5a5a540f2c69c8b56448e06098d368ecdb4.tar.gz |
encryption cleanup: small changes
* comments
* move my_bytes_to_key() and my_aes_hex2uint() into file_key_management_plugin
* rename HA_INSERT_ORDER -> HA_PRESERVE_INSERT_ORDER
* remove unused variables and declarations
* fix casts
* don't link innodb with pcre
* remove redundant entries from aria's TARGET_LINK_LIBRARIES
Diffstat (limited to 'include/my_aes.h')
-rw-r--r-- | include/my_aes.h | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/include/my_aes.h b/include/my_aes.h index 057fa1e9860..3d9c9c1a8c9 100644 --- a/include/my_aes.h +++ b/include/my_aes.h @@ -1,4 +1,5 @@ /* Copyright (c) 2002, 2006 MySQL AB, 2009 Sun Microsystems, Inc. + Copyright (c) 2014, 2015 MariaDB Corporation Use is subject to license terms. This program is free software; you can redistribute it and/or modify @@ -21,7 +22,6 @@ #ifndef MY_AES_INCLUDED #define MY_AES_INCLUDED -/* We expect same result code from encryption functions as in my_aes.h */ typedef int Crypt_result; #define AES_OK 0 @@ -36,7 +36,7 @@ typedef int Crypt_result; #define CRYPT_BUFFER_TO_SMALL -11 #define CRYPT_KEY_UNKNOWN -48 -/* The max block sizes of all supported algorithms */ +/* The block size for all supported algorithms */ #define MY_AES_BLOCK_SIZE 16 /* The max key length of all supported algorithms */ @@ -127,38 +127,6 @@ my_bool my_aes_init_dynamic_encrypt(enum enum_my_aes_encryption_algorithm method extern MYSQL_PLUGIN_IMPORT enum enum_my_aes_encryption_algorithm current_aes_dynamic_method; - - -/** - Calculate key and iv from a given salt and secret as it is handled in openssl - encrypted files via console - - SYNOPSIS - my_bytes_to_key() - - @param salt [in] the given salt as extracted from the encrypted file - @param secret [in] the given secret as String, provided by the user - @param key [out] 32 Bytes of key are written to this pointer - @param iv [out] 16 Bytes of iv are written to this pointer - */ - -void my_bytes_to_key(const uchar *salt, - const char *secret, uchar *key, - uchar *iv); - -/** - Decode Hexencoded String to uint8[]. - - SYNOPSIS - my_aes_hex2uint() - @param iv [in] Pointer to hexadecimal encoded IV String - @param dest [out] Pointer to output uint8 array. Memory needs to be - allocated by caller - @param iv_length [in] Size of destination array. - */ - -void my_aes_hex2uint(const char *in, uchar *out, int dest_length); - /** Crypt buffer with AES encryption algorithm. |