Skip to content

File hide_password.cpp

FileList > base > hide_password.cpp

Go to the source code of this file

  • #include <stdio.h>
  • #include <stdarg.h>
  • #include <stdlib.h>
  • #include <time.h>
  • #include <string.h>
  • #include <errno.h>
  • #include <unistd.h>
  • #include <sys/time.h>
  • #include <sys/timeb.h>
  • #include <signal.h>
  • #include <assert.h>
  • #include "porting.h"
  • #include "cas_common.h"
  • #include "hide_password.h"
  • #include "system_parameter.h"
  • #include "chartype.h"

Classes

Type Name
class hide_password

Public Functions

Type Name
void password_add_offset (HIDE_PWD_INFO_PTR hide_pwd_info_ptr, int start, int end, bool is_add_comma, EN_ADD_PWD_STRING en_add_pwd_string)
void password_fprintf (FILE * fp, char * query, HIDE_PWD_INFO_PTR hide_pwd_info_ptr, int(*)(FILE *, const char *,...) cas_fprintf)
bool password_remake_offset_for_one_query (HIDE_PWD_INFO_PTR new_hide_pwd_info_ptr, HIDE_PWD_INFO_PTR orig_hide_pwd_info_ptr, int start_pos, int end_pos)
int password_snprint (char * msg, int size, char * query, HIDE_PWD_INFO_PTR hide_pwd_info_ptr)

Macros

Type Name
define GET_END_PWD_OFFSET (pwd_info_ptr) ((pwd\_info\_ptr)[0] + ((pwd\_info\_ptr)[1] & [**MAX\_PWD\_LENGTH**](hide__password_8cpp.md#define-max_pwd_length)))
define IDX_CALL_STMT (0)
define IDX_CREATE_STMT (1)
define IDX_SERVER_STMT (0)
define IS_PWD_NEED_COMMA (pwd_info_ptr) (((pwd\_info\_ptr)[1] &gt;&gt; 30) & 0x01)
define IS_PWD_NEED_PASSWORD (pwd_info_ptr) (([**EN\_ADD\_PWD\_STRING**](hide__password_8h.md#enum-en_add_pwd_string))(((pwd\_info\_ptr)[1] &gt;&gt; 28) & 0x03))
define MAX_PWD_LENGTH (0x0FFFFFFF)
define SET_PWD_ADDINFO (comma, en_pwd) ((([**comma**](broker__monitor_8c.md#function-timeout)) ? (0x01 &lt;&lt; 30) : 0) \| ((([**en\_pwd**](broker__monitor_8c.md#function-timeout)) & 0x03) &lt;&lt; 28))
define SET_PWD_LENGTH (s, e) (([**e**](broker__monitor_8c.md#function-timeout)) - (s))
define SET_PWD_LENGTH_N_ADDINFO (s, e, comma, en_pwd) ([**SET\_PWD\_ADDINFO**](hide__password_8cpp.md#define-set_pwd_addinfo)(([**comma**](broker__monitor_8c.md#function-timeout)), ([**en\_pwd**](broker__monitor_8c.md#function-timeout))) \| [**SET\_PWD\_LENGTH**](hide__password_8cpp.md#define-set_pwd_length)((s), ([**e**](broker__monitor_8c.md#function-timeout))))
define SKIP_SPACE_CHARACTERS (p) /* multi line expression */

Public Functions Documentation

function password_add_offset

void password_add_offset (
    HIDE_PWD_INFO_PTR hide_pwd_info_ptr,
    int start,
    int end,
    bool is_add_comma,
    EN_ADD_PWD_STRING en_add_pwd_string
) 

function password_fprintf

void password_fprintf (
    FILE * fp,
    char * query,
    HIDE_PWD_INFO_PTR hide_pwd_info_ptr,
    int (*)( FILE *, const  char *,...) cas_fprintf
) 

function password_remake_offset_for_one_query

bool password_remake_offset_for_one_query (
    HIDE_PWD_INFO_PTR new_hide_pwd_info_ptr,
    HIDE_PWD_INFO_PTR orig_hide_pwd_info_ptr,
    int start_pos,
    int end_pos
) 

function password_snprint

int password_snprint (
    char * msg,
    int size,
    char * query,
    HIDE_PWD_INFO_PTR hide_pwd_info_ptr
) 

Macro Definition Documentation

define GET_END_PWD_OFFSET

#define GET_END_PWD_OFFSET (
    pwd_info_ptr
) `((pwd_info_ptr)[0] + ((pwd_info_ptr)[1] & MAX_PWD_LENGTH ))`

define IDX_CALL_STMT

#define IDX_CALL_STMT `(0)`

define IDX_CREATE_STMT

#define IDX_CREATE_STMT `(1)`

define IDX_SERVER_STMT

#define IDX_SERVER_STMT `(0)`

define IS_PWD_NEED_COMMA

#define IS_PWD_NEED_COMMA (
    pwd_info_ptr
) `(((pwd_info_ptr)[1] >> 30) & 0x01)`

define IS_PWD_NEED_PASSWORD

#define IS_PWD_NEED_PASSWORD (
    pwd_info_ptr
) `(( EN_ADD_PWD_STRING )(((pwd_info_ptr)[1] >> 28) & 0x03))`

define MAX_PWD_LENGTH

#define MAX_PWD_LENGTH `(0x0FFFFFFF)`

define SET_PWD_ADDINFO

#define SET_PWD_ADDINFO (
    comma,
    en_pwd
) `((( comma ) ? (0x01 << 30) : 0) | ((( en_pwd ) & 0x03) << 28))`

define SET_PWD_LENGTH

#define SET_PWD_LENGTH (
    s,
    e
) `(( e ) - (s))`

define SET_PWD_LENGTH_N_ADDINFO

#define SET_PWD_LENGTH_N_ADDINFO (
    s,
    e,
    comma,
    en_pwd
) `( SET_PWD_ADDINFO (( comma ), ( en_pwd )) | SET_PWD_LENGTH ((s), ( e )))`

define SKIP_SPACE_CHARACTERS

#define SKIP_SPACE_CHARACTERS (
    p
) `/* multi line expression */`


The documentation for this class was generated from the following file cubrid/src/base/hide_password.cpp