irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

obf.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HASH_TYPE_MD5   1
 
#define HASH_TYPE_SHA1   2
 
#define HASH_TYPE_DEFAULT   3
 
#define SHA1_FLAG_STRING   ":::sha1"
 

Functions

void obfDecodeByKey (const char *in, const char *key, char *out)
 
int obfRmPw (int opt)
 
int obfGetPw (char *pw)
 
int obfSavePw (int promptOpt, int fileOpt, int printOpt, const char *pwArg)
 
int obfTempOps (int tmpOpt)
 
int obfiGetEnvKey ()
 
int obfiGetTv (char *fileName)
 
int obfiDecode (const char *in, char *out, int extra)
 
int obfiGetPw (const char *fileName, char *pw)
 
int obfiOpenOutFile (const char *fileName, int fileOpt)
 
int obfiWritePw (int fd, const char *pw)
 
void obfiEncode (const char *in, char *out, int extra)
 
void obfEncodeByKey (const char *in, const char *key, char *out)
 
void obfEncodeByKeyV2 (const char *in, const char *key, const char *key2, char *out)
 
void obfDecodeByKeyV2 (const char *in, const char *key, const char *key2, char *out)
 
void obfMakeOneWayHash (int hashType, unsigned const char *inBuf, int inBufSize, unsigned char *outHash)
 
void obfSetDefaultHashType (int type)
 
int obfGetDefaultHashType ()
 
char * obfGetMD5Hash (const char *stringToHash)
 

Macro Definition Documentation

◆ HASH_TYPE_DEFAULT

#define HASH_TYPE_DEFAULT   3

Definition at line 10 of file obf.h.

◆ HASH_TYPE_MD5

#define HASH_TYPE_MD5   1

Definition at line 8 of file obf.h.

◆ HASH_TYPE_SHA1

#define HASH_TYPE_SHA1   2

Definition at line 9 of file obf.h.

◆ SHA1_FLAG_STRING

#define SHA1_FLAG_STRING   ":::sha1"

Definition at line 11 of file obf.h.

Function Documentation

◆ obfDecodeByKey()

void obfDecodeByKey ( const char *  in,
const char *  key,
char *  out 
)

Definition at line 1155 of file obf.cpp.

References irods.pypyodbc::buffer, cipherBlockChaining, HASH_TYPE_MD5, HASH_TYPE_SHA1, int(), keyBuf(), obfDebug, obfMakeOneWayHash(), manual_cleanup::out, and irods.password_obfuscation::wheel.

Referenced by icatDescramble(), and obfDecodeByKeyV2().

Here is the call graph for this function:

◆ obfDecodeByKeyV2()

void obfDecodeByKeyV2 ( const char *  in,
const char *  key,
const char *  key2,
char *  out 
)

Definition at line 1268 of file obf.cpp.

References cipherBlockChaining, match(), MAX_PASSWORD_LEN, obfDecodeByKey(), obfGetMD5Hash(), manual_cleanup::out, and V2_Prefix.

Referenced by decodePw().

Here is the call graph for this function:

◆ obfEncodeByKey()

void obfEncodeByKey ( const char *  in,
const char *  key,
char *  out 
)

Definition at line 1007 of file obf.cpp.

References irods.pypyodbc::buffer, cipherBlockChaining, defaultHashType, HASH_TYPE_DEFAULT, HASH_TYPE_SHA1, int(), keyBuf(), obfDebug, obfMakeOneWayHash(), manual_cleanup::out, and irods.password_obfuscation::wheel.

Referenced by icatScramble(), and obfEncodeByKeyV2().

Here is the call graph for this function:

◆ obfEncodeByKeyV2()

void obfEncodeByKeyV2 ( const char *  in,
const char *  key,
const char *  key2,
char *  out 
)

Definition at line 1120 of file obf.cpp.

References cipherBlockChaining, obfEncodeByKey(), obfGetMD5Hash(), manual_cleanup::out, and V2_Prefix.

Here is the call graph for this function:

◆ obfGetDefaultHashType()

int obfGetDefaultHashType ( )

Definition at line 964 of file obf.cpp.

References defaultHashType.

◆ obfGetMD5Hash()

char* obfGetMD5Hash ( const char *  stringToHash)

Definition at line 1305 of file obf.cpp.

References irods.pypyodbc::buffer, HASH_TYPE_DEFAULT, keyBuf(), and obfMakeOneWayHash().

Referenced by obfDecodeByKeyV2(), and obfEncodeByKeyV2().

Here is the call graph for this function:

◆ obfGetPw()

int obfGetPw ( char *  pw)

Definition at line 159 of file obf.cpp.

References isTemp, MAX_NAME_LEN, MAX_PASSWORD_LEN, obfDebug, obfiDecode(), obfiGetEnvKey(), obfiGetFilename(), obfiGetPw(), obfiGetTv(), and TMP_FLAG.

Referenced by clientLoginTTL(), native_auth_establish_context(), obfTempOps(), and obftestmain().

Here is the call graph for this function:

◆ obfiDecode()

int obfiDecode ( const char *  in,
char *  out,
int  extra 
)

Definition at line 742 of file obf.cpp.

References AUTH_FILE_NOT_ENCRYPTED, int(), obfDebug, obfiTimeCheck(), manual_cleanup::out, timeVal, and irods.password_obfuscation::wheel.

Referenced by obfGetPw().

Here is the call graph for this function:

◆ obfiEncode()

void obfiEncode ( const char *  in,
char *  out,
int  extra 
)

Definition at line 534 of file obf.cpp.

References int(), obfDebug, obfiTimeval(), manual_cleanup::out, timeVal, and irods.password_obfuscation::wheel.

Referenced by obfSavePw().

Here is the call graph for this function:

◆ obfiGetEnvKey()

int obfiGetEnvKey ( )

Definition at line 950 of file obf.cpp.

Referenced by obfGetPw(), and obfSavePw().

◆ obfiGetPw()

int obfiGetPw ( const char *  fileName,
char *  pw 
)

Definition at line 429 of file obf.cpp.

References buf, FILE_OPEN_ERR, FILE_READ_ERR, MAX_PASSWORD_LEN, and PASSWORD_EXCEEDS_MAX_SIZE.

Referenced by obfGetPw().

◆ obfiGetTv()

int obfiGetTv ( char *  fileName)

Definition at line 405 of file obf.cpp.

References timeVal, and UNABLE_TO_STAT_FILE.

Referenced by obfGetPw().

◆ obfiOpenOutFile()

int obfiOpenOutFile ( const char *  fileName,
int  fileOpt 
)

Definition at line 457 of file obf.cpp.

References FILE_OPEN_ERR, MAX_NAME_LEN, and NULL.

Referenced by obfSavePw().

◆ obfiWritePw()

int obfiWritePw ( int  fd,
const char *  pw 
)

Definition at line 502 of file obf.cpp.

References FILE_WRITE_ERR.

Referenced by obfSavePw().

◆ obfMakeOneWayHash()

void obfMakeOneWayHash ( int  hashType,
unsigned const char *  inBuf,
int  inBufSize,
unsigned char *  outHash 
)

◆ obfRmPw()

int obfRmPw ( int  opt)

Definition at line 212 of file obf.cpp.

References AUTH_FILE_DOES_NOT_EXIST, error, irods::experimental::administration::client::v1::exists(), MAX_NAME_LEN, NULL, obfiGetFilename(), irods::experimental::filesystem::client::remove(), irods.pypyodbc::status, and UNLINK_FAILED.

Here is the call graph for this function:

◆ obfSavePw()

int obfSavePw ( int  promptOpt,
int  fileOpt,
int  printOpt,
const char *  pwArg 
)

Definition at line 281 of file obf.cpp.

References doTemp, FILE_OPEN_ERR, MAX_NAME_LEN, MAX_PASSWORD_LEN, NO_PASSWORD_ENTERED, NULL, obfDebug, obfiEncode(), obfiGetEnvKey(), obfiGetFilename(), obfiOpenOutFile(), obfiSetTimeFromFile(), obfiWritePw(), PASSWORD_EXCEEDS_MAX_SIZE, and TMP_FLAG.

Referenced by clientLoginPam(), clientLoginTTL(), obftestmain(), and pam_auth_client_request().

Here is the call graph for this function:

◆ obfSetDefaultHashType()

void obfSetDefaultHashType ( int  type)

Definition at line 956 of file obf.cpp.

References defaultHashType, obfDebug, and type.

◆ obfTempOps()

int obfTempOps ( int  tmpOpt)

Definition at line 379 of file obf.cpp.

References doTemp, isTemp, MAX_NAME_LEN, MAX_PASSWORD_LEN, obfGetPw(), and obfiGetFilename().

Here is the call graph for this function: