/// <summary> /// Initialize this instance. /// </summary> public static void Initialize() { // Initialize the threading locks var nLocks = Native.CRYPTO_num_locks(); lock_objects = new List <object>(nLocks); for (var i = 0; i < nLocks; i++) { var obj = new object(); lock_objects.Add(obj); } // Initialize the internal thread id stack _threadIDs = new List <uint>(); // Initialize the delegate for the locking callback Native.CRYPTO_set_locking_callback(_ptrOnLocking); // Initialize the thread id callback Native.CRYPTO_THREADID_set_callback(_ptrOnThreadId); }