CUBRID Engine  latest
crypt_opfunc.h File Reference
#include "thread_compat.hpp"
Include dependency graph for crypt_opfunc.h:
This graph shows which files directly or indirectly include this file:

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)
 

Enumeration Type Documentation

Enumerator
AES_128_ECB 
DES_ECB 

Definition at line 36 of file crypt_opfunc.h.

Enumerator
HEX_LOWERCASE 
HEX_UPPERCASE 

Definition at line 30 of file crypt_opfunc.h.

Function Documentation

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().

Here is the caller graph for this function:

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_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_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().

Here is the caller graph for this function:

int crypt_md5_buffer_hex ( const char *  buffer,
size_t  len,
char *  resblock 
)
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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function: