small fix that could prevent issues with some minifiers

This commit is contained in:
Juan Hernández Serrano 2021-08-06 09:14:18 +02:00
parent 54f0a8d9b9
commit f11626d029
6 changed files with 14 additions and 14 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -153,7 +153,7 @@ A promise that resolves to a boolean that is either true (a probably prime numbe
#### Defined in #### Defined in
[src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/c269de2/src/ts/isProbablyPrime.ts#L21) [src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/54f0a8d/src/ts/isProbablyPrime.ts#L21)
___ ___
@ -317,7 +317,7 @@ A promise that resolves to a bigint probable prime of bitLength bits.
#### Defined in #### Defined in
[src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/c269de2/src/ts/prime.ts#L21) [src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/54f0a8d/src/ts/prime.ts#L21)
___ ___
@ -346,7 +346,7 @@ A bigint probable prime of bitLength bits.
#### Defined in #### Defined in
[src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/c269de2/src/ts/prime.ts#L100) [src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/54f0a8d/src/ts/prime.ts#L100)
___ ___
@ -374,7 +374,7 @@ A cryptographically secure random bigint between [min,max]
#### Defined in #### Defined in
[src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/c269de2/src/ts/randBetween.ts#L15) [src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/54f0a8d/src/ts/randBetween.ts#L15)
___ ___
@ -402,7 +402,7 @@ A Promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cry
#### Defined in #### Defined in
[src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/c269de2/src/ts/randBits.ts#L14) [src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/54f0a8d/src/ts/randBits.ts#L14)
___ ___
@ -430,7 +430,7 @@ A Uint8Array/Buffer (Browser/Node.js) filled with cryptographically secure rando
#### Defined in #### Defined in
[src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/c269de2/src/ts/randBits.ts#L45) [src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/54f0a8d/src/ts/randBits.ts#L45)
___ ___
@ -458,7 +458,7 @@ A promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cry
#### Defined in #### Defined in
[src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/c269de2/src/ts/randBytes.ts#L12) [src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/54f0a8d/src/ts/randBytes.ts#L12)
___ ___
@ -486,7 +486,7 @@ A UInt8Array/Buffer (Browser/Node.js) filled with cryptographically secure rando
#### Defined in #### Defined in
[src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/c269de2/src/ts/randBytes.ts#L46) [src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/54f0a8d/src/ts/randBytes.ts#L46)
___ ___

View File

@ -393,7 +393,7 @@ export function _isProbablyPrimeWorkerUrl (): string {
// Let's us first add all the required functions // Let's us first add all the required functions
let workerCode = `'use strict';const ${eGcd.name}=${eGcd.toString()};const ${modInv.name}=${modInv.toString()};const ${modPow.name}=${modPow.toString()};const ${toZn.name}=${toZn.toString()};const ${randBitsSync.name}=${randBitsSync.toString()};const ${randBytesSync.name}=${randBytesSync.toString()};const ${randBetween.name}=${randBetween.toString()};const ${isProbablyPrime.name}=${_isProbablyPrime.toString()};${bitLength.toString()};${fromBuffer.toString()};` let workerCode = `'use strict';const ${eGcd.name}=${eGcd.toString()};const ${modInv.name}=${modInv.toString()};const ${modPow.name}=${modPow.toString()};const ${toZn.name}=${toZn.toString()};const ${randBitsSync.name}=${randBitsSync.toString()};const ${randBytesSync.name}=${randBytesSync.toString()};const ${randBetween.name}=${randBetween.toString()};const ${isProbablyPrime.name}=${_isProbablyPrime.toString()};${bitLength.toString()};${fromBuffer.toString()};`
workerCode += `onmessage=async function(e){const m={isPrime:await ${isProbablyPrime.name}(e.data.rnd,e.data.iterations),value:e.data.rnd,id:e.data.id};postMessage(m);}` workerCode += `onmessage=async function(_e){const _m={isPrime:await ${isProbablyPrime.name}(_e.data.rnd,_e.data.iterations),value:_e.data.rnd,id:_e.data.id};postMessage(_m);}`
return _workerUrl(workerCode) return _workerUrl(workerCode)
} }