&
GetName(
void)
const{
returnm_Name; }
59 const string&
GetValue(
void)
const{
returnm_Value; }
62 void SetValue(
const string& new_value) { m_Value = new_value; }
75 operator bool(
void)
const{
return!x_IsEmpty(); }
97 bool x_IsEmpty(
void)
const{
returnm_Name.empty(); }
100 stringx_GetEncoded(
void)
const;
114 static stringGetDefaultFileName(
void);
122 voidSaveFile(
const string& new_name =
kEmptyStr);
127 const string& pwd)
const;
133 voidDeleteResourceInfo(
const string& res_name,
151 voidParsePlainTextFile(
const string& filename);
156 stringx_GetDataPassword(
const string& name_pwd,
157 const string& res_name)
const;
189 static stringEncrypt(
const string& original_string);
204 static stringDecrypt(
const string& encrypted_string);
207 static voidReload(
void);
217 static stringEncrypt(
const string& original_string,
218 const string& password);
228 static stringDecrypt(
const string& encrypted_string,
229 const string& password);
243 static stringEncryptForDomain(
const string& original_string,
244 const string& domain);
257 static stringDecryptForDomain(
const string& encrypted_string,
258 const string& domain);
267 static stringGenerateKey(
const string&
seed);
278 static boolIsEncrypted(
const string&
data);
281 static const char* GetVersion(
void);
288: m_Severity(
eDiag_Trace), m_Line(0), m_Version(0)
293 const string&
file,
314 static voidsx_InitKeyMap(
void);
316 static stringx_GetBinKeyChecksum(
const string&
key);
319 static stringx_LoadKeys(
const string& filename,
TKeyMap* keys);
322 static stringx_GetDomainKeys(
const string& domain,
TKeyMap* keys);
324 static stringx_Encrypt(
const string&
data,
const string&
key);
326 static stringx_Decrypt(
const string&
data,
const TKeyMap& keys);
329 static stringx_AddSalt(
const string&
data,
char version);
330 static stringx_RemoveSalt(
const string&
data,
char version);
351 switch( GetErrCode() ) {
352 caseeFileSave:
return "eFileSave";
353 caseeParser:
return "eParser";
354 caseeDecrypt:
return "eDecrypt";
378 switch( GetErrCode() ) {
379 caseeMissingKey:
return "eMissingKey";
380 caseeBadPassword:
return "eBadPassword";
381 caseeBadFormat:
return "eBadFormat";
382 caseeBadDomain:
return "eBadDomain";
383 caseeBadVersion:
return "eBadVersion";
Exception thrown by encryption classes.
virtual const char * GetErrCodeString(void) const override
NCBI_EXCEPTION_DEFAULT(CNcbiEncryptException, CException)
"NCBI keys file" â contains a set of encryption keys, one key per line.
static CSafeStatic< CNcbiEncrypt::TKeyMap > s_KeyMap
static CSafeStatic< string > s_DefaultKey
map< string, SEncryptionKeyInfo > TKeyMap
static volatile bool s_KeysInitialized
Exception thrown by resource info classes.
NCBI_EXCEPTION_DEFAULT(CNcbiResourceInfoException, CException)
virtual const char * GetErrCodeString(void) const override
Class for handling resource info files.
map< string, SResInfoCache > TCache
Class for storing encrypted resource information.
multimap< string, string > TExtraValuesMap
Types to access extra values.
CStringPairs< TExtraValuesMap > TExtraValues
void SetValue(const string &new_value)
Set new main value for the resource.
CNcbiResourceInfo(const CNcbiResourceInfo &)
bool x_IsEmpty(void) const
const string & GetName(void) const
Get resource name.
TExtraValues & GetExtraValues_NC(void)
Get non-const set of extra values associated with the resource.
const TExtraValues & GetExtraValues(void) const
Get read-only set of extra values associated with the resource.
CNcbiResourceInfo & operator=(const CNcbiResourceInfo &)
const string & GetValue(void) const
Get main value associated with the requested resource.
Helper class for object allocation/deallocation.
The NCBI C++ standard methods for dealing with std::string.
EDiagSev
Severity level for the posted diagnostics.
@ eDiag_Trace
Trace message.
virtual const char * GetErrCodeString(void) const
Get error code interpreted as text.
#define EXCEPTION_VIRTUAL_BASE
Do not use virtual base classes in exception declaration at all, because in this case derived class s...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_XNCBI_EXPORT
const string version
version string
const struct ncbi::grid::netcache::search::fields::KEY key
Static variables safety - create on demand, destroy on application termination.
Defines NCBI C++ exception handling.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
Defines Limits for the types used in NCBI C/C++ toolkit.
SEncryptionKeyInfo(const string &key, EDiagSev sev, const string &file, size_t line, char ver)
CRef< CNcbiResourceInfo > info
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4