Skip to main content
checkPrimeSync - node__crypto.d.ts - Node documentation
function checkPrimeSync

Usage in Deno

```typescript import { checkPrimeSync } from "node:node__crypto.d.ts"; ```
checkPrimeSync(
candidate: LargeNumberLike,
): boolean
Checks the primality of the `candidate`.

Parameters

candidate: LargeNumberLike
A possible prime encoded as a sequence of big endian octets of arbitrary length.
optional
options: CheckPrimeOptions

Return Type

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