From f48ae774854c833ae647ab83d6ad3a46f90cbb89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Hern=C3=A1ndez=20Serrano?=
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)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