def ModExp(a, b, c):
  if not _FOUND_SSL:
    return pow(a, b, c)
  # convert arbitrary long args to bytes
  bytes_a = number.LongToBytes(a)
  bytes_b = number.LongToBytes(b)
  bytes_c = number.LongToBytes(c)

  # convert bytes to (pointer to) Bignums.
  bn_a = ssl.BN_bin2bn(bytes_a, len(bytes_a), 0)
  bn_b = ssl.BN_bin2bn(bytes_b, len(bytes_b), 0)
  bn_c = ssl.BN_bin2bn(bytes_c, len(bytes_c), 0)
  bn_result = ssl.BN_new()
  ctx = ssl.BN_CTX_new()

  # exponentiate and convert result to long
  ssl.BN_mod_exp(bn_result, bn_a, bn_b, bn_c, ctx)
  num_bytes_in_result = _NumBytesBn(bn_result)
  bytes_result = ctypes.create_string_buffer(num_bytes_in_result)
  ssl.BN_bn2bin(bn_result, bytes_result)
  long_result = number.BytesToLong(bytes_result.raw)

  # clean up
  ssl.BN_CTX_free(ctx)
  ssl.BN_free(bn_a)
  ssl.BN_free(bn_b)
  ssl.BN_free(bn_c)
  ssl.BN_free(bn_result)

  return long_result
Generate and start size threads with target func.
dataset/ETHPy150Open google/encrypted-bigquery-client/src/paillier.py/ModExp--crossover with--dataset/ETHPy150Open talos/jsongit/test/test_threads.py/TestRepoThreading.do_with_threads