diff --git a/README.md b/README.md index 9b20dbf..72f69b1 100644 --- a/README.md +++ b/README.md @@ -264,7 +264,7 @@ Returns a cryptographically secure random integer between [min,max] Secure random bits for both node and browsers. Node version uses crypto.randomFill() and browser one self.crypto.getRandomValues() **Kind**: global function -**Returns**: Buffer \| Uint8Array - A Buffer/UInt8Array filled with cryptographically secure random bits +**Returns**: Buffer \| Uint8Array - A Buffer/UInt8Array (Node.js/Browser) filled with cryptographically secure random bits | Param | Type | Description | | --- | --- | --- | @@ -277,7 +277,7 @@ Secure random bits for both node and browsers. Node version uses crypto.randomFi Secure random bytes for both node and browsers. Node version uses crypto.randomFill() and browser one self.crypto.getRandomValues() **Kind**: global function -**Returns**: Buffer \| Uint8Array - A Buffer/UInt8Array filled with cryptographically secure random bytes +**Returns**: Buffer \| Uint8Array - A Buffer/UInt8Array (Node.js/Browser) filled with cryptographically secure random bytes | Param | Type | Description | | --- | --- | --- | diff --git a/dist/bigint-crypto-utils-latest.browser.js b/dist/bigint-crypto-utils-latest.browser.js index 79e51fa..4556c61 100644 --- a/dist/bigint-crypto-utils-latest.browser.js +++ b/dist/bigint-crypto-utils-latest.browser.js @@ -264,7 +264,7 @@ var bigintCryptoUtils = (function (exports) { * @param {number} bitLength The desired number of random bits * @param {boolean} forceLength If we want to force the output to have a specific bit length. It basically forces the msb to be 1 * - * @returns {Buffer|Uint8Array} A Buffer/UInt8Array filled with cryptographically secure random bits + * @returns {Buffer|Uint8Array} A Buffer/UInt8Array (Node.js/Browser) filled with cryptographically secure random bits */ function randBits(bitLength, forceLength = false) { const byteLength = Math.ceil(bitLength / 8); @@ -284,7 +284,7 @@ var bigintCryptoUtils = (function (exports) { * @param {number} byteLength The desired number of random bytes * @param {boolean} forceLength If we want to force the output to have a bit length of 8*byteLength. It basically forces the msb to be 1 * - * @returns {Buffer|Uint8Array} A Buffer/UInt8Array filled with cryptographically secure random bytes + * @returns {Buffer|Uint8Array} A Buffer/UInt8Array (Node.js/Browser) filled with cryptographically secure random bytes */ function randBytes(byteLength, forceLength = false) { let buf; diff --git a/dist/bigint-crypto-utils-latest.browser.mod.js b/dist/bigint-crypto-utils-latest.browser.mod.js index 3ed5cfb..c7a267f 100644 --- a/dist/bigint-crypto-utils-latest.browser.mod.js +++ b/dist/bigint-crypto-utils-latest.browser.mod.js @@ -261,7 +261,7 @@ function randBetween(max, min = _ONE) { * @param {number} bitLength The desired number of random bits * @param {boolean} forceLength If we want to force the output to have a specific bit length. It basically forces the msb to be 1 * - * @returns {Buffer|Uint8Array} A Buffer/UInt8Array filled with cryptographically secure random bits + * @returns {Buffer|Uint8Array} A Buffer/UInt8Array (Node.js/Browser) filled with cryptographically secure random bits */ function randBits(bitLength, forceLength = false) { const byteLength = Math.ceil(bitLength / 8); @@ -281,7 +281,7 @@ function randBits(bitLength, forceLength = false) { * @param {number} byteLength The desired number of random bytes * @param {boolean} forceLength If we want to force the output to have a bit length of 8*byteLength. It basically forces the msb to be 1 * - * @returns {Buffer|Uint8Array} A Buffer/UInt8Array filled with cryptographically secure random bytes + * @returns {Buffer|Uint8Array} A Buffer/UInt8Array (Node.js/Browser) filled with cryptographically secure random bytes */ function randBytes(byteLength, forceLength = false) { let buf; diff --git a/dist/bigint-crypto-utils-latest.node.js b/dist/bigint-crypto-utils-latest.node.js index a2e508f..7fa703a 100644 --- a/dist/bigint-crypto-utils-latest.node.js +++ b/dist/bigint-crypto-utils-latest.node.js @@ -279,7 +279,7 @@ function randBetween(max, min = _ONE) { * @param {number} bitLength The desired number of random bits * @param {boolean} forceLength If we want to force the output to have a specific bit length. It basically forces the msb to be 1 * - * @returns {Buffer|Uint8Array} A Buffer/UInt8Array filled with cryptographically secure random bits + * @returns {Buffer|Uint8Array} A Buffer/UInt8Array (Node.js/Browser) filled with cryptographically secure random bits */ function randBits(bitLength, forceLength = false) { const byteLength = Math.ceil(bitLength / 8); @@ -299,7 +299,7 @@ function randBits(bitLength, forceLength = false) { * @param {number} byteLength The desired number of random bytes * @param {boolean} forceLength If we want to force the output to have a bit length of 8*byteLength. It basically forces the msb to be 1 * - * @returns {Buffer|Uint8Array} A Buffer/UInt8Array filled with cryptographically secure random bytes + * @returns {Buffer|Uint8Array} A Buffer/UInt8Array (Node.js/Browser) filled with cryptographically secure random bytes */ function randBytes(byteLength, forceLength = false) { let buf; diff --git a/src/main.js b/src/main.js index b60a6d2..b8e2a0b 100644 --- a/src/main.js +++ b/src/main.js @@ -303,7 +303,7 @@ export function randBetween(max, min = _ONE) { * @param {number} bitLength The desired number of random bits * @param {boolean} forceLength If we want to force the output to have a specific bit length. It basically forces the msb to be 1 * - * @returns {Buffer|Uint8Array} A Buffer/UInt8Array filled with cryptographically secure random bits + * @returns {Buffer|Uint8Array} A Buffer/UInt8Array (Node.js/Browser) filled with cryptographically secure random bits */ export function randBits(bitLength, forceLength = false) { const byteLength = Math.ceil(bitLength / 8); @@ -323,7 +323,7 @@ export function randBits(bitLength, forceLength = false) { * @param {number} byteLength The desired number of random bytes * @param {boolean} forceLength If we want to force the output to have a bit length of 8*byteLength. It basically forces the msb to be 1 * - * @returns {Buffer|Uint8Array} A Buffer/UInt8Array filled with cryptographically secure random bytes + * @returns {Buffer|Uint8Array} A Buffer/UInt8Array (Node.js/Browser) filled with cryptographically secure random bytes */ export function randBytes(byteLength, forceLength = false) { let buf;