diff --git a/README.md b/README.md index d98c057..c15460c 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,9 @@ iterations of Miller-Rabin Probabilistic Primality Test (FIPS 186-4 C.3.1)

prime(bitLength, iterations)Promise

A probably-prime (Miller-Rabin), cryptographically-secure, random-number generator. The browser version uses web workers to parallelise prime look up. Therefore, it does not lock the UI -main process, and it can be much faster (if several cores or cpu are available).

+main process, and it can be much faster (if several cores or cpu are available). +The node version can also use worker_threads if they are available (enabled by default with Node 11 and +and can be enabled at runtime executing node --experimental-worker with node >=10.5.0)

randBetween(max, min)Promise

Returns a cryptographically secure random integer between [min,max]

@@ -227,7 +229,9 @@ Modular exponentiation a**b mod n ## prime(bitLength, iterations) ⇒ Promise A probably-prime (Miller-Rabin), cryptographically-secure, random-number generator. The browser version uses web workers to parallelise prime look up. Therefore, it does not lock the UI -main process, and it can be much faster (if several cores or cpu are available). +main process, and it can be much faster (if several cores or cpu are available). +The node version can also use worker_threads if they are available (enabled by default with Node 11 and +and can be enabled at runtime executing node --experimental-worker with node >=10.5.0) **Kind**: global function **Returns**: Promise - A promise that resolves to a bigint probable prime of bitLength bits diff --git a/dist/bigint-crypto-utils-latest.browser.js b/dist/bigint-crypto-utils-latest.browser.js index 315e8e0..884c3a9 100644 --- a/dist/bigint-crypto-utils-latest.browser.js +++ b/dist/bigint-crypto-utils-latest.browser.js @@ -184,6 +184,8 @@ var bigintCryptoUtils = (function (exports) { * A probably-prime (Miller-Rabin), cryptographically-secure, random-number generator. * The browser version uses web workers to parallelise prime look up. Therefore, it does not lock the UI * main process, and it can be much faster (if several cores or cpu are available). + * The node version can also use worker_threads if they are available (enabled by default with Node 11 and + * and can be enabled at runtime executing node --experimental-worker with node >=10.5.0) * * @param {number} bitLength The required bit length for the generated prime * @param {number} iterations The number of iterations for the Miller-Rabin Probabilistic Primality Test diff --git a/dist/bigint-crypto-utils-latest.browser.mod.js b/dist/bigint-crypto-utils-latest.browser.mod.js index 556e6a0..155e8f7 100644 --- a/dist/bigint-crypto-utils-latest.browser.mod.js +++ b/dist/bigint-crypto-utils-latest.browser.mod.js @@ -181,6 +181,8 @@ function modPow(a, b, n) { * A probably-prime (Miller-Rabin), cryptographically-secure, random-number generator. * The browser version uses web workers to parallelise prime look up. Therefore, it does not lock the UI * main process, and it can be much faster (if several cores or cpu are available). + * The node version can also use worker_threads if they are available (enabled by default with Node 11 and + * and can be enabled at runtime executing node --experimental-worker with node >=10.5.0) * * @param {number} bitLength The required bit length for the generated prime * @param {number} iterations The number of iterations for the Miller-Rabin Probabilistic Primality Test diff --git a/dist/bigint-crypto-utils-latest.node.js b/dist/bigint-crypto-utils-latest.node.js index b3c0b83..3b1035f 100644 --- a/dist/bigint-crypto-utils-latest.node.js +++ b/dist/bigint-crypto-utils-latest.node.js @@ -189,6 +189,8 @@ function modPow(a, b, n) { * A probably-prime (Miller-Rabin), cryptographically-secure, random-number generator. * The browser version uses web workers to parallelise prime look up. Therefore, it does not lock the UI * main process, and it can be much faster (if several cores or cpu are available). + * The node version can also use worker_threads if they are available (enabled by default with Node 11 and + * and can be enabled at runtime executing node --experimental-worker with node >=10.5.0) * * @param {number} bitLength The required bit length for the generated prime * @param {number} iterations The number of iterations for the Miller-Rabin Probabilistic Primality Test diff --git a/src/main.js b/src/main.js index 8ec9e15..bf5d300 100644 --- a/src/main.js +++ b/src/main.js @@ -206,6 +206,8 @@ export function modPow(a, b, n) { * A probably-prime (Miller-Rabin), cryptographically-secure, random-number generator. * The browser version uses web workers to parallelise prime look up. Therefore, it does not lock the UI * main process, and it can be much faster (if several cores or cpu are available). + * The node version can also use worker_threads if they are available (enabled by default with Node 11 and + * and can be enabled at runtime executing node --experimental-worker with node >=10.5.0) * * @param {number} bitLength The required bit length for the generated prime * @param {number} iterations The number of iterations for the Miller-Rabin Probabilistic Primality Test