HadronZoo::Dissemino cookies have names based on fixed names Make a unique cookie for your internet aplication
| Return Type | Function name | Arguments |
|---|---|---|
| hzSysID | hdsApp::MakeCookie | (hzIpaddr&,uint32_t,) |
Declared in file: hzDissemino.h
Defined in file : hdsSystem.cpp
Function Logic:
Function body:
hzSysID hdsApp::MakeCookie (hzIpaddr& ipa)uint32_t eventNo,
{
// Category: Internet
//
// HadronZoo::Dissemino cookies have names based on fixed names Make a unique cookie for your internet aplication
//
// Arguments: 1) Cookie The target where the cookie will be stored (hzString reference)
// 2) ipa The browser ip address
// 3) appname The application name
//
// Returns: E_MEMORY If there was insufficient memory to complete the operation
// E_OK If the operation was successful
_hzfunc(__func__) ;
hzSysID cookie ; // The cookie to be
uint64_t seed ; // The cookie value to be
time_t pt ; // Current system epoch time stamp
seed = (uint64_t) 0;
pt = time(&pt) ;
seed = (pt << 32);
seed &= 0xffffffff00000000;
seed |= (uint32_t) ipa ;
cookie = seed ;
return cookie ;
}