mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
Added Ben's patches:
* Compilation for FreeBSD. * Notes that MT is not cryptographically secure. * modified sorting of DHT Window. Only one change that I didn't commit: bitdht { - LIBS += ../../libbitdht/src/lib/libbitdht.a - PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a + LIBS += ../../libbitdht/src/libbitdht.a + PRE_TARGETDEPS *= ../../libbitdht/src/libbitdht.a } As this would have broken compilation on the other platforms. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4619 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bb9f362458
commit
5ea8cfb67d
9 changed files with 62 additions and 12 deletions
|
@ -12,6 +12,9 @@ static bool auto_seed = RSRandom::seed( (time(NULL) + ((uint32_t) pthread_self()
|
|||
#else
|
||||
#ifdef __APPLE__
|
||||
static bool auto_seed = RSRandom::seed( (time(NULL) + pthread_mach_thread_np(pthread_self())*0x1293fe + (getpid()^0x113ef76b))^0x18e34a12 ) ;
|
||||
#elif defined(__FreeBSD__)
|
||||
// since this is completely insecure anyway, just kludge for now
|
||||
static bool auto_seed = RSRandom::seed(time(NULL));
|
||||
#else
|
||||
static bool auto_seed = RSRandom::seed( (time(NULL) + pthread_self()*0x1293fe + (getpid()^0x113ef76b))^0x18e34a12 ) ;
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
// - thread safe
|
||||
// - system independant
|
||||
// - fast
|
||||
// - cryptographically safe
|
||||
// - NOT CRYPTOGRAPHICALLY SAFE
|
||||
// - DO NOT USE FOR ANYTHING REQUIRING STRONG RANDOMNESS
|
||||
//
|
||||
// The implementation is adapted from the Mersenne Twister page of Wikipedia.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue