CUBRID Engine
latest
|
#include "thread_compat.hpp"
Go to the source code of this file.
Enumerations | |
enum | HEX_LETTERCASE { HEX_LOWERCASE, HEX_UPPERCASE } |
enum | CIPHER_ENCRYPTION_TYPE { AES_128_ECB, DES_ECB } |
Functions | |
int | crypt_default_encrypt (THREAD_ENTRY *thread_p, const char *src, int src_len, const char *key, int key_len, char **dest_p, int *dest_len_p, CIPHER_ENCRYPTION_TYPE enc_type) |
int | crypt_default_decrypt (THREAD_ENTRY *thread_p, const char *src, int src_len, const char *key, int key_len, char **dest_p, int *dest_len_p, CIPHER_ENCRYPTION_TYPE enc_type) |
int | crypt_sha_one (THREAD_ENTRY *thread_p, const char *src, int src_len, char **dest_p, int *dest_len_p) |
int | crypt_sha_two (THREAD_ENTRY *thread_p, const char *src, int src_len, int need_hash_len, char **dest_p, int *dest_len_p) |
int | crypt_md5_buffer_hex (const char *buffer, size_t len, char *resblock) |
char * | str_to_hex (THREAD_ENTRY *thread_p, const char *src, int src_len, char **dest_p, int *dest_len_p, HEX_LETTERCASE lettercase) |
void | str_to_hex_prealloced (const char *src, int src_len, char *dest, int dest_len, HEX_LETTERCASE lettercase) |
int | crypt_generate_random_bytes (char *dest, int length) |
void | crypt_crc32 (const char *src, int src_len, int *dest) |
Enumerator | |
---|---|
AES_128_ECB | |
DES_ECB |
Definition at line 36 of file crypt_opfunc.h.
enum HEX_LETTERCASE |
Enumerator | |
---|---|
HEX_LOWERCASE | |
HEX_UPPERCASE |
Definition at line 30 of file crypt_opfunc.h.
void crypt_crc32 | ( | const char * | src, |
int | src_len, | ||
int * | dest | ||
) |
Definition at line 672 of file crypt_opfunc.c.
References assert, CRC::Calculate(), CRC::CRC_32(), and NULL.
Referenced by db_crc32_dbval(), logpb_compute_page_checksum(), and logwr_check_page_checksum().
int crypt_default_decrypt | ( | THREAD_ENTRY * | thread_p, |
const char * | src, | ||
int | src_len, | ||
const char * | key, | ||
int | key_len, | ||
char ** | dest_p, | ||
int * | dest_len_p, | ||
CIPHER_ENCRYPTION_TYPE | enc_type | ||
) |
Definition at line 334 of file crypt_opfunc.c.
References AES128_BLOCK_LEN, AES128_KEY_LEN, AES_128_ECB, aes_default_gen_key(), ARG_FILE_LINE, assert, CRYPT_LIB_CRYPT_ERR, crypt_lib_fail_info, CRYPT_LIB_INIT_ERR, db_private_alloc, db_private_free_and_init, DES_BLOCK_LEN, DES_ECB, ER_ENCRYPTION_LIB_FAILED, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), i, NO_ERROR, NULL, and thread_get_thread_entry_info().
Referenced by db_string_aes_decrypt().
int crypt_default_encrypt | ( | THREAD_ENTRY * | thread_p, |
const char * | src, | ||
int | src_len, | ||
const char * | key, | ||
int | key_len, | ||
char ** | dest_p, | ||
int * | dest_len_p, | ||
CIPHER_ENCRYPTION_TYPE | enc_type | ||
) |
Definition at line 212 of file crypt_opfunc.c.
References AES128_BLOCK_LEN, AES128_KEY_LEN, AES_128_ECB, aes_default_gen_key(), ARG_FILE_LINE, assert, CRYPT_LIB_CRYPT_ERR, crypt_lib_fail_info, CRYPT_LIB_INIT_ERR, db_private_alloc, db_private_free_and_init, DES_BLOCK_LEN, DES_ECB, ER_ENCRYPTION_LIB_FAILED, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), NO_ERROR, NULL, and thread_get_thread_entry_info().
Referenced by crypt_encrypt_printable(), and db_string_aes_encrypt().
int crypt_generate_random_bytes | ( | char * | dest, |
int | length | ||
) |
Definition at line 688 of file crypt_opfunc.c.
References ARG_FILE_LINE, assert, CRYPT_LIB_CRYPT_ERR, crypt_lib_fail_info, ER_ENCRYPTION_LIB_FAILED, ER_ERROR_SEVERITY, er_set(), NO_ERROR, and NULL.
Referenced by db_guid().
int crypt_md5_buffer_hex | ( | const char * | buffer, |
size_t | len, | ||
char * | resblock | ||
) |
Definition at line 646 of file crypt_opfunc.c.
References assert, crypt_md5_buffer_binary(), ER_FAILED, HEX_LOWERCASE, MD5_CHECKSUM_HEX_LEN, MD5_CHECKSUM_LEN, NO_ERROR, NULL, and str_to_hex_prealloced().
Referenced by db_string_md5(), locale_compute_coll_checksum(), locale_compute_locale_checksum(), qmgr_get_sql_id(), sm_default_constraint_name(), and tzc_compute_timezone_checksum().
int crypt_sha_one | ( | THREAD_ENTRY * | thread_p, |
const char * | src, | ||
int | src_len, | ||
char ** | dest_p, | ||
int * | dest_len_p | ||
) |
Definition at line 473 of file crypt_opfunc.c.
References crypt_sha_functions(), and SHA_ONE.
Referenced by db_string_sha_one().
int crypt_sha_two | ( | THREAD_ENTRY * | thread_p, |
const char * | src, | ||
int | src_len, | ||
int | need_hash_len, | ||
char ** | dest_p, | ||
int * | dest_len_p | ||
) |
Definition at line 490 of file crypt_opfunc.c.
References crypt_sha_functions(), NO_ERROR, SHA_TWO_224, SHA_TWO_256, SHA_TWO_384, and SHA_TWO_512.
Referenced by db_string_sha_two(), and encrypt_password_sha2_512().
char* str_to_hex | ( | THREAD_ENTRY * | thread_p, |
const char * | src, | ||
int | src_len, | ||
char ** | dest_p, | ||
int * | dest_len_p, | ||
HEX_LETTERCASE | lettercase | ||
) |
Definition at line 141 of file crypt_opfunc.c.
References assert, db_private_alloc, i, NULL, str_to_hex_prealloced(), and thread_get_thread_entry_info().
Referenced by crypt_sha_functions().
void str_to_hex_prealloced | ( | const char * | src, |
int | src_len, | ||
char * | dest, | ||
int | dest_len, | ||
HEX_LETTERCASE | lettercase | ||
) |
Definition at line 103 of file crypt_opfunc.c.
References assert, HEX_UPPERCASE, i, lower_hextable, NULL, and upper_hextable.
Referenced by crypt_md5_buffer_hex(), and str_to_hex().