NCBI C++ ToolKit
Macros | Functions | Variables
resource_info.cpp File Reference
#include <ncbi_pch.hpp>
#include <ncbiconf.h>
#include <corelib/ncbi_bswap.hpp>
#include <corelib/ncbi_param.hpp>
#include <corelib/ncbimtx.hpp>
#include <corelib/ncbifile.hpp>
#include <corelib/ncbistr.hpp>
#include <corelib/resource_info.hpp>
+ Include dependency graph for resource_info.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define TEA_MX   ((z >> 5)^(y << 2)) + (((y >> 3)^(z << 4))^(sum^y)) + (key[(p & 3)^e]^z);
 

Functions

void CalcMD5 (const char *data, size_t len, unsigned char *digest)
 
string x_BlockTEA_Encode (const string &str_key, const string &src, size_t block_size)
 
string x_BlockTEA_Decode (const string &str_key, const string &src, size_t block_size)
 
 NCBI_PARAM_DECL (string, NCBI_KEY, FILES)
 
 NCBI_PARAM_DEF_EX (string, NCBI_KEY, FILES, "", eParam_NoThread, NCBI_KEY_FILES)
 
typedef NCBI_PARAM_TYPE (NCBI_KEY, FILES) TKeyFiles
 
 NCBI_PARAM_DECL (string, NCBI_KEY, PATHS)
 
 NCBI_PARAM_DEF_EX (string, NCBI_KEY, PATHS, "$$", eParam_NoThread, NCBI_KEY_PATHS)
 
typedef NCBI_PARAM_TYPE (NCBI_KEY, PATHS) TKeyPaths
 
 DEFINE_STATIC_MUTEX (s_EncryptMutex)
 

Variables

static const char * kDefaultResourceInfoPath = "/etc/ncbi/.info"
 
static const char * kResourceValueSeparator = " "
 
static const char * kResourceExtraSeparator = "&"
 
static const char * kParserSeparators = " \t"
 
const char * kDefaultKeysFile = ".ncbi_keys"
 
const char * kDefaultKeysPath = "/opt/ncbi/config"
 
const char * kKeysDomainPrefix = ".ncbi_keys."
 
const char * kNcbiEncryptVersion = "2"
 
const size_t kSaltLength = 16
 

Macro Definition Documentation

◆ TEA_MX

#define TEA_MX   ((z >> 5)^(y << 2)) + (((y >> 3)^(z << 4))^(sum^y)) + (key[(p & 3)^e]^z);

Definition at line 864 of file resource_info.cpp.

Function Documentation

◆ CalcMD5()

void CalcMD5 ( const char *  data,
size_t  len,
unsigned char *  digest 
)

◆ DEFINE_STATIC_MUTEX()

DEFINE_STATIC_MUTEX ( s_EncryptMutex  )

◆ NCBI_PARAM_DECL() [1/2]

NCBI_PARAM_DECL ( string  ,
NCBI_KEY  ,
FILES   
)

◆ NCBI_PARAM_DECL() [2/2]

NCBI_PARAM_DECL ( string  ,
NCBI_KEY  ,
PATHS   
)

◆ NCBI_PARAM_DEF_EX() [1/2]

NCBI_PARAM_DEF_EX ( string  ,
NCBI_KEY  ,
FILES  ,
""  ,
eParam_NoThread  ,
NCBI_KEY_FILES   
)

◆ NCBI_PARAM_DEF_EX() [2/2]

NCBI_PARAM_DEF_EX ( string  ,
NCBI_KEY  ,
PATHS  ,
"$$"  ,
eParam_NoThread  ,
NCBI_KEY_PATHS   
)

◆ NCBI_PARAM_TYPE() [1/2]

typedef NCBI_PARAM_TYPE ( NCBI_KEY  ,
FILES   
)

◆ NCBI_PARAM_TYPE() [2/2]

typedef NCBI_PARAM_TYPE ( NCBI_KEY  ,
PATHS   
)

◆ x_BlockTEA_Decode()

string x_BlockTEA_Decode ( const string str_key,
const string src,
size_t  block_size 
)

Definition at line 1000 of file resource_info.cpp.

References _ASSERT, buf, i, kEmptyStr, and ncbi::grid::netcache::search::fields::key.

Referenced by CNcbiEncrypt::x_Decrypt().

◆ x_BlockTEA_Encode()

string x_BlockTEA_Encode ( const string str_key,
const string src,
size_t  block_size 
)

Variable Documentation

◆ kDefaultKeysFile

const char* kDefaultKeysFile = ".ncbi_keys"

Definition at line 431 of file resource_info.cpp.

Referenced by CNcbiEncrypt::sx_InitKeyMap().

◆ kDefaultKeysPath

const char* kDefaultKeysPath = "/opt/ncbi/config"

Definition at line 432 of file resource_info.cpp.

Referenced by CNcbiEncrypt::x_GetDomainKeys().

◆ kDefaultResourceInfoPath

const char* kDefaultResourceInfoPath = "/etc/ncbi/.info"
static

Definition at line 182 of file resource_info.cpp.

Referenced by CNcbiResourceInfoFile::GetDefaultFileName().

◆ kKeysDomainPrefix

const char* kKeysDomainPrefix = ".ncbi_keys."

Definition at line 433 of file resource_info.cpp.

Referenced by CNcbiEncrypt::x_GetDomainKeys().

◆ kNcbiEncryptVersion

const char* kNcbiEncryptVersion = "2"

◆ kParserSeparators

const char* kParserSeparators = " \t"
static

Definition at line 188 of file resource_info.cpp.

Referenced by CNcbiResourceInfoFile::AddResourceInfo().

◆ kResourceExtraSeparator

const char* kResourceExtraSeparator = "&"
static

◆ kResourceValueSeparator

const char* kResourceValueSeparator = " "
static

◆ kSaltLength

const size_t kSaltLength = 16

Definition at line 816 of file resource_info.cpp.

Referenced by CNcbiEncrypt::x_AddSalt(), and CNcbiEncrypt::x_RemoveSalt().

Modified on Fri Mar 01 10:04:40 2024 by modify_doxy.py rev. 669887