MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / InitCrypto

Function InitCrypto

libi2pd/Crypto.cpp:951–967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

949 }*/
950
951 void InitCrypto (bool precomputation)
952 {
953/* auto numLocks = CRYPTO_num_locks();
954 for (int i = 0; i < numLocks; i++)
955 m_OpenSSLMutexes.emplace_back (new std::mutex);
956 CRYPTO_set_locking_callback (OpensslLockingCallback);*/
957 if (precomputation)
958 {
959#if IS_X86_64
960 g_ElggTable = new BIGNUM * [ELGAMAL_FULL_EXPONENT_NUM_BYTES][255];
961 PrecalculateElggTable (g_ElggTable, ELGAMAL_FULL_EXPONENT_NUM_BYTES);
962#else
963 g_ElggTable = new BIGNUM * [ELGAMAL_SHORT_EXPONENT_NUM_BYTES][255];
964 PrecalculateElggTable (g_ElggTable, ELGAMAL_SHORT_EXPONENT_NUM_BYTES);
965#endif
966 }
967 }
968
969 void TerminateCrypto ()
970 {

Callers 2

initMethod · 0.85
InitI2PFunction · 0.85

Calls 1

PrecalculateElggTableFunction · 0.85

Tested by

no test coverage detected