MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / CInit

Method CInit

src/commons/util/util.cpp:103–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101class CInit {
102public:
103 CInit() {
104 // Init OpenSSL library multithreading support
105 ppmutexOpenSSL =
106 (CCriticalSection**)OPENSSL_malloc(CRYPTO_num_locks() * sizeof(CCriticalSection*));
107 for (int i = 0; i < CRYPTO_num_locks(); i++) ppmutexOpenSSL[i] = new CCriticalSection();
108 CRYPTO_set_locking_callback(locking_callback);
109
110#ifdef WIN32
111 // Seed random number generator with screen scrape and other hardware sources
112 RAND_screen();
113#endif
114
115 // Seed random number generator with performance counter
116 RandAddSeed();
117 }
118 ~CInit() {
119 // Shutdown OpenSSL library multithreading support
120 CRYPTO_set_locking_callback(NULL);

Callers

nothing calls this directly

Calls 1

RandAddSeedFunction · 0.85

Tested by

no test coverage detected