FcheckPrimeSync
Bun

function

crypto.checkPrimeSync

function checkPrimeSync(
candidate: LargeNumberLike,
): boolean;

Checks the primality of the candidate.

@param candidate

A possible prime encoded as a sequence of big endian octets of arbitrary length.

@returns

true if the candidate is a prime with an error probability less than 0.25 ** options.checks.