from secrets import randbits
from sympy import isprime


def get_prime(prime_length:int) -> int:
	"""
	Returns a prime number. Doing it this way to require less modules.

	:param prime_length: The length in bits that the prime has to be.
	:return: A prime integer.
	"""


	num = randbits(prime_length)
	while not isprime(num):
		num = randbits(prime_length)
	return num