updated readme: BigInt is now is es2020, instructions for typescript
This commit is contained in:
parent
87d4c967fe
commit
5dbb6ddb93
58
README.hbs
58
README.hbs
|
@ -1,25 +1,29 @@
|
|||
# bigint-crypto-utils
|
||||
|
||||
Utils for working with cryptography using native JS (stage 3) implementation of BigInt. It includes some extra functions to work with modular arithmetics along with secure random numbers and a fast strong probable prime generator/tester (parallelised multi-threaded Miller-Rabin primality test). It can be used by any [Web Browser or webview supporting BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) and with Node.js (>=10.4.0). In the latter case, for multi-threaded primality tests, you should use Node.js v11 or newer or enable at runtime with `node --experimental-worker` with Node.js version >= 10.5.0 and < 11.
|
||||
Utils for working with cryptography using native JS ([ECMA-262](https://tc39.es/ecma262/#sec-bigint-objects)) implementation of BigInt. It includes some extra functions to work with modular arithmetics along with secure random numbers and a fast strong probable prime generator/tester (parallelised multi-threaded Miller-Rabin primality test). It can be used by any [Web Browser or webview supporting BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) and with Node.js (>=10.4.0). In the latter case, for multi-threaded primality tests, you should use Node.js v11 or newer or enable at runtime with `node --experimental-worker` with Node.js version >= 10.5.0 and < 11.
|
||||
|
||||
_The operations supported on BigInts are not constant time. BigInt can be therefore **[unsuitable for use in cryptography](https://www.chosenplaintext.ca/articles/beginners-guide-constant-time-cryptography.html).** Many platforms provide native support for cryptography, such as [Web Cryptography API](https://w3c.github.io/webcrypto/) or [Node.js Crypto](https://nodejs.org/dist/latest/docs/api/crypto.html)._
|
||||
> The operations supported on BigInts are not constant time. BigInt can be therefore **[unsuitable for use in cryptography](https://www.chosenplaintext.ca/articles/beginners-guide-constant-time-cryptography.html).** Many platforms provide native support for cryptography, such as [Web Cryptography API](https://w3c.github.io/webcrypto/) or [Node.js Crypto](https://nodejs.org/dist/latest/docs/api/crypto.html).
|
||||
|
||||
## Installation
|
||||
|
||||
bigint-crypto-utils is distributed for [web browsers and/or webviews supporting BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) as an ES6 module or an IIFE file; and for Node.js (>=10.4.0), as a CJS module.
|
||||
|
||||
bigint-crypto-utils can be imported to your project with `npm`:
|
||||
|
||||
```bash
|
||||
npm install bigint-crypto-utils
|
||||
```
|
||||
|
||||
NPM installation defaults to the ES6 module for browsers and the CJS one for Node.js.
|
||||
|
||||
For web browsers, you can also directly download the [IIFE file](https://raw.githubusercontent.com/juanelas/bigint-crypto-utils/master/dist/bigint-crypto-utils-latest.browser.js) or the [ES6 module](https://raw.githubusercontent.com/juanelas/bigint-crypto-utils/master/dist/bigint-crypto-utils-latest.browser.mod.min.js) from GitHub.
|
||||
|
||||
## Usage example
|
||||
## Usage examples
|
||||
|
||||
### Node.js:
|
||||
|
||||
With node js:
|
||||
```javascript
|
||||
const bigintCryptoUtils = require('bigint-crypto-utils');
|
||||
const bigintCryptoUtils = require("bigint-crypto-utils");
|
||||
|
||||
/* Stage 3 BigInts with value 666 can be declared as BigInt('666')
|
||||
or the shorter new no-so-linter-friendly syntax 666n.
|
||||
|
@ -27,50 +31,52 @@ Notice that you can also pass a number, e.g. BigInt(666), but it is not
|
|||
recommended since values over 2**53 - 1 won't be safe but no warning will
|
||||
be raised.
|
||||
*/
|
||||
let a = BigInt('5');
|
||||
let b = BigInt('2');
|
||||
let n = BigInt('19');
|
||||
let a = BigInt("5");
|
||||
let b = BigInt("2");
|
||||
let n = BigInt("19");
|
||||
|
||||
console.log(bigintCryptoUtils.modPow(a, b, n)); // prints 6
|
||||
|
||||
console.log(bigintCryptoUtils.modInv(BigInt('2'), BigInt('5'))); // prints 3
|
||||
console.log(bigintCryptoUtils.modInv(BigInt("2"), BigInt("5"))); // prints 3
|
||||
|
||||
console.log(bigintCryptoUtils.modInv(BigInt('3'), BigInt('5'))); // prints 2
|
||||
console.log(bigintCryptoUtils.modInv(BigInt("3"), BigInt("5"))); // prints 2
|
||||
|
||||
// Generation of a probable prime of 2048 bits
|
||||
const prime = await bigintCryptoUtils.prime(2048);
|
||||
|
||||
// Testing if a prime is a probable prime (Miller-Rabin)
|
||||
if ( await bigintCryptoUtils.isProbablyPrime(prime) )
|
||||
// code if is prime
|
||||
|
||||
// Get a cryptographically secure random number between 1 and 2**256 bits.
|
||||
const rnd = bigintCryptoUtils.randBetween(BigInt(2) ** BigInt(256));
|
||||
if (await bigintCryptoUtils.isProbablyPrime(prime))
|
||||
// code if is prime
|
||||
|
||||
// Get a cryptographically secure random number between 1 and 2**256 bits.
|
||||
const rnd = bigintCryptoUtils.randBetween(BigInt(2) ** BigInt(256));
|
||||
```
|
||||
|
||||
From a browser, you can just load the module in a html page as:
|
||||
### Javascript native from a browser
|
||||
|
||||
You can just load the module in a html page as:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import * as bigintCryptoUtils from 'bigint-utils-latest.browser.mod.min.js';
|
||||
import * as bigintCryptoUtils from "bigint-utils-latest.browser.mod.min.js";
|
||||
|
||||
let a = BigInt('5');
|
||||
let b = BigInt('2');
|
||||
let n = BigInt('19');
|
||||
let a = BigInt("5");
|
||||
let b = BigInt("2");
|
||||
let n = BigInt("19");
|
||||
|
||||
console.log(bigintCryptoUtils.modPow(a, b, n)); // prints 6
|
||||
|
||||
console.log(bigintCryptoUtils.modInv(BigInt('2'), BigInt('5'))); // prints 3
|
||||
console.log(bigintCryptoUtils.modInv(BigInt("2"), BigInt("5"))); // prints 3
|
||||
|
||||
console.log(bigintCryptoUtils.modInv(BigInt('3'), BigInt('5'))); // prints 2
|
||||
console.log(bigintCryptoUtils.modInv(BigInt("3"), BigInt("5"))); // prints 2
|
||||
|
||||
(async function () {
|
||||
(async function() {
|
||||
// Generation of a probable prime of 2018 bits
|
||||
const p = await bigintCryptoUtils.prime(2048);
|
||||
|
||||
// Testing if a prime is a probable prime (Miller-Rabin)
|
||||
const isPrime = await bigintCryptoUtils.isProbablyPrime(p);
|
||||
alert(p.toString() + '\nIs prime?\n' + isPrime);
|
||||
alert(p.toString() + "\nIs prime?\n" + isPrime);
|
||||
|
||||
// Get a cryptographically secure random number between 1 and 2**256 bits.
|
||||
const rnd = bigintCryptoUtils.randBetween(BigInt(2) ** BigInt(256));
|
||||
|
@ -79,6 +85,10 @@ From a browser, you can just load the module in a html page as:
|
|||
</script>
|
||||
```
|
||||
|
||||
### TypeScript
|
||||
|
||||
BigInt is currently [ECMA-262](https://tc39.es/ecma262/#sec-bigint-objects) and thus in order to use it with TypeScript you should set `lib` (and probably also `target` and `module`) to `esnext` in `tsconfig.json`.
|
||||
|
||||
# bigint-crypto-utils JS Doc
|
||||
|
||||
{{>main}}
|
||||
|
|
58
README.md
58
README.md
|
@ -1,25 +1,29 @@
|
|||
# bigint-crypto-utils
|
||||
|
||||
Utils for working with cryptography using native JS (stage 3) implementation of BigInt. It includes some extra functions to work with modular arithmetics along with secure random numbers and a fast strong probable prime generator/tester (parallelised multi-threaded Miller-Rabin primality test). It can be used by any [Web Browser or webview supporting BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) and with Node.js (>=10.4.0). In the latter case, for multi-threaded primality tests, you should use Node.js v11 or newer or enable at runtime with `node --experimental-worker` with Node.js version >= 10.5.0 and < 11.
|
||||
Utils for working with cryptography using native JS ([ECMA-262](https://tc39.es/ecma262/#sec-bigint-objects)) implementation of BigInt. It includes some extra functions to work with modular arithmetics along with secure random numbers and a fast strong probable prime generator/tester (parallelised multi-threaded Miller-Rabin primality test). It can be used by any [Web Browser or webview supporting BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) and with Node.js (>=10.4.0). In the latter case, for multi-threaded primality tests, you should use Node.js v11 or newer or enable at runtime with `node --experimental-worker` with Node.js version >= 10.5.0 and < 11.
|
||||
|
||||
_The operations supported on BigInts are not constant time. BigInt can be therefore **[unsuitable for use in cryptography](https://www.chosenplaintext.ca/articles/beginners-guide-constant-time-cryptography.html).** Many platforms provide native support for cryptography, such as [Web Cryptography API](https://w3c.github.io/webcrypto/) or [Node.js Crypto](https://nodejs.org/dist/latest/docs/api/crypto.html)._
|
||||
> The operations supported on BigInts are not constant time. BigInt can be therefore **[unsuitable for use in cryptography](https://www.chosenplaintext.ca/articles/beginners-guide-constant-time-cryptography.html).** Many platforms provide native support for cryptography, such as [Web Cryptography API](https://w3c.github.io/webcrypto/) or [Node.js Crypto](https://nodejs.org/dist/latest/docs/api/crypto.html).
|
||||
|
||||
## Installation
|
||||
|
||||
bigint-crypto-utils is distributed for [web browsers and/or webviews supporting BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) as an ES6 module or an IIFE file; and for Node.js (>=10.4.0), as a CJS module.
|
||||
|
||||
bigint-crypto-utils can be imported to your project with `npm`:
|
||||
|
||||
```bash
|
||||
npm install bigint-crypto-utils
|
||||
```
|
||||
|
||||
NPM installation defaults to the ES6 module for browsers and the CJS one for Node.js.
|
||||
|
||||
For web browsers, you can also directly download the [IIFE file](https://raw.githubusercontent.com/juanelas/bigint-crypto-utils/master/dist/bigint-crypto-utils-latest.browser.js) or the [ES6 module](https://raw.githubusercontent.com/juanelas/bigint-crypto-utils/master/dist/bigint-crypto-utils-latest.browser.mod.min.js) from GitHub.
|
||||
|
||||
## Usage example
|
||||
## Usage examples
|
||||
|
||||
### Node.js:
|
||||
|
||||
With node js:
|
||||
```javascript
|
||||
const bigintCryptoUtils = require('bigint-crypto-utils');
|
||||
const bigintCryptoUtils = require("bigint-crypto-utils");
|
||||
|
||||
/* Stage 3 BigInts with value 666 can be declared as BigInt('666')
|
||||
or the shorter new no-so-linter-friendly syntax 666n.
|
||||
|
@ -27,50 +31,52 @@ Notice that you can also pass a number, e.g. BigInt(666), but it is not
|
|||
recommended since values over 2**53 - 1 won't be safe but no warning will
|
||||
be raised.
|
||||
*/
|
||||
let a = BigInt('5');
|
||||
let b = BigInt('2');
|
||||
let n = BigInt('19');
|
||||
let a = BigInt("5");
|
||||
let b = BigInt("2");
|
||||
let n = BigInt("19");
|
||||
|
||||
console.log(bigintCryptoUtils.modPow(a, b, n)); // prints 6
|
||||
|
||||
console.log(bigintCryptoUtils.modInv(BigInt('2'), BigInt('5'))); // prints 3
|
||||
console.log(bigintCryptoUtils.modInv(BigInt("2"), BigInt("5"))); // prints 3
|
||||
|
||||
console.log(bigintCryptoUtils.modInv(BigInt('3'), BigInt('5'))); // prints 2
|
||||
console.log(bigintCryptoUtils.modInv(BigInt("3"), BigInt("5"))); // prints 2
|
||||
|
||||
// Generation of a probable prime of 2048 bits
|
||||
const prime = await bigintCryptoUtils.prime(2048);
|
||||
|
||||
// Testing if a prime is a probable prime (Miller-Rabin)
|
||||
if ( await bigintCryptoUtils.isProbablyPrime(prime) )
|
||||
// code if is prime
|
||||
|
||||
// Get a cryptographically secure random number between 1 and 2**256 bits.
|
||||
const rnd = bigintCryptoUtils.randBetween(BigInt(2) ** BigInt(256));
|
||||
if (await bigintCryptoUtils.isProbablyPrime(prime))
|
||||
// code if is prime
|
||||
|
||||
// Get a cryptographically secure random number between 1 and 2**256 bits.
|
||||
const rnd = bigintCryptoUtils.randBetween(BigInt(2) ** BigInt(256));
|
||||
```
|
||||
|
||||
From a browser, you can just load the module in a html page as:
|
||||
### Javascript native from a browser
|
||||
|
||||
You can just load the module in a html page as:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import * as bigintCryptoUtils from 'bigint-utils-latest.browser.mod.min.js';
|
||||
import * as bigintCryptoUtils from "bigint-utils-latest.browser.mod.min.js";
|
||||
|
||||
let a = BigInt('5');
|
||||
let b = BigInt('2');
|
||||
let n = BigInt('19');
|
||||
let a = BigInt("5");
|
||||
let b = BigInt("2");
|
||||
let n = BigInt("19");
|
||||
|
||||
console.log(bigintCryptoUtils.modPow(a, b, n)); // prints 6
|
||||
|
||||
console.log(bigintCryptoUtils.modInv(BigInt('2'), BigInt('5'))); // prints 3
|
||||
console.log(bigintCryptoUtils.modInv(BigInt("2"), BigInt("5"))); // prints 3
|
||||
|
||||
console.log(bigintCryptoUtils.modInv(BigInt('3'), BigInt('5'))); // prints 2
|
||||
console.log(bigintCryptoUtils.modInv(BigInt("3"), BigInt("5"))); // prints 2
|
||||
|
||||
(async function () {
|
||||
(async function() {
|
||||
// Generation of a probable prime of 2018 bits
|
||||
const p = await bigintCryptoUtils.prime(2048);
|
||||
|
||||
// Testing if a prime is a probable prime (Miller-Rabin)
|
||||
const isPrime = await bigintCryptoUtils.isProbablyPrime(p);
|
||||
alert(p.toString() + '\nIs prime?\n' + isPrime);
|
||||
alert(p.toString() + "\nIs prime?\n" + isPrime);
|
||||
|
||||
// Get a cryptographically secure random number between 1 and 2**256 bits.
|
||||
const rnd = bigintCryptoUtils.randBetween(BigInt(2) ** BigInt(256));
|
||||
|
@ -79,6 +85,10 @@ From a browser, you can just load the module in a html page as:
|
|||
</script>
|
||||
```
|
||||
|
||||
### TypeScript
|
||||
|
||||
BigInt is currently [ECMA-262](https://tc39.es/ecma262/#sec-bigint-objects) and thus in order to use it with TypeScript you should set `lib` (and probably also `target` and `module`) to `esnext` in `tsconfig.json`.
|
||||
|
||||
# bigint-crypto-utils JS Doc
|
||||
|
||||
## Functions
|
||||
|
|
|
@ -195,19 +195,47 @@
|
|||
"dev": true
|
||||
},
|
||||
"@rollup/plugin-replace": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.2.1.tgz",
|
||||
"integrity": "sha512-dgq5ijT8fK18KTb1inenZ61ivTayV7pvbz2+ivT+VN20BOgJVM1fqoBETqGHKgFVm/J9BhR82mQyAtxfpPv1lQ==",
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.3.1.tgz",
|
||||
"integrity": "sha512-qDcXj2VOa5+j0iudjb+LiwZHvBRRgWbHPhRmo1qde2KItTjuxDVQO21rp9/jOlzKR5YO0EsgRQoyox7fnL7y/A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"magic-string": "^0.25.2",
|
||||
"rollup-pluginutils": "^2.6.0"
|
||||
"@rollup/pluginutils": "^3.0.4",
|
||||
"magic-string": "^0.25.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"magic-string": {
|
||||
"version": "0.25.6",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.6.tgz",
|
||||
"integrity": "sha512-3a5LOMSGoCTH5rbqobC2HuDNRtE2glHZ8J7pK+QZYppyWA36yuNpsX994rIY2nCuyP7CZYy7lQq/X2jygiZ89g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sourcemap-codec": "^1.4.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@rollup/pluginutils": {
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.8.tgz",
|
||||
"integrity": "sha512-rYGeAc4sxcZ+kPG/Tw4/fwJODC3IXHYDH4qusdN/b6aLw5LPUbzpecYbEJh4sVQGPFJxd2dBU4kc1H3oy9/bnw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"estree-walker": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"estree-walker": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
|
||||
"integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@types/estree": {
|
||||
"version": "0.0.40",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.40.tgz",
|
||||
"integrity": "sha512-p3KZgMto/JyxosKGmnLDJ/dG5wf+qTRMUjHJcspC2oQKa4jP7mz+tv0ND56lLBu3ojHlhzY33Ol+khLyNmilkA==",
|
||||
"version": "0.0.42",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.42.tgz",
|
||||
"integrity": "sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
|
@ -232,18 +260,18 @@
|
|||
"dev": true
|
||||
},
|
||||
"acorn-jsx": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz",
|
||||
"integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==",
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz",
|
||||
"integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==",
|
||||
"dev": true
|
||||
},
|
||||
"ajv": {
|
||||
"version": "6.10.2",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
|
||||
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
|
||||
"version": "6.12.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
|
||||
"integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
"json-schema-traverse": "^0.4.1",
|
||||
"uri-js": "^4.2.2"
|
||||
|
@ -1028,9 +1056,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"eslint": {
|
||||
"version": "6.7.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.2.tgz",
|
||||
"integrity": "sha512-qMlSWJaCSxDFr8fBPvJM9kJwbazrhNcBU3+DszDW1OlEwKBBRWsJc7NJFelvwQpanHCR14cOLD41x8Eqvo3Nng==",
|
||||
"version": "6.8.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
|
||||
"integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
|
@ -1115,9 +1143,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"esquery": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz",
|
||||
"integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz",
|
||||
"integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"estraverse": "^4.0.0"
|
||||
|
@ -1171,15 +1199,15 @@
|
|||
}
|
||||
},
|
||||
"fast-deep-equal": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
|
||||
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
|
||||
"integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==",
|
||||
"dev": true
|
||||
},
|
||||
"fast-json-stable-stringify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
|
||||
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
||||
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
|
||||
"dev": true
|
||||
},
|
||||
"fast-levenshtein": {
|
||||
|
@ -1189,9 +1217,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"figures": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz",
|
||||
"integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==",
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
|
||||
"integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "^1.0.5"
|
||||
|
@ -1494,9 +1522,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz",
|
||||
"integrity": "sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==",
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz",
|
||||
"integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-escapes": "^4.2.1",
|
||||
|
@ -1508,7 +1536,7 @@
|
|||
"lodash": "^4.17.15",
|
||||
"mute-stream": "0.0.8",
|
||||
"run-async": "^2.2.0",
|
||||
"rxjs": "^6.4.0",
|
||||
"rxjs": "^6.5.3",
|
||||
"string-width": "^4.1.0",
|
||||
"strip-ansi": "^5.1.0",
|
||||
"through": "^2.3.6"
|
||||
|
@ -2400,9 +2428,9 @@
|
|||
}
|
||||
},
|
||||
"rollup": {
|
||||
"version": "1.27.13",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.27.13.tgz",
|
||||
"integrity": "sha512-hDi7M07MpmNSDE8YVwGVFA8L7n8jTLJ4lG65nMAijAyqBe//rtu4JdxjUBE7JqXfdpqxqDTbCDys9WcqdpsQvw==",
|
||||
"version": "1.31.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.31.1.tgz",
|
||||
"integrity": "sha512-2JREN1YdrS/kpPzEd33ZjtuNbOuBC3ePfuZBdKEybvqcEcszW1ckyVqzcEiEe0nE8sqHK+pbJg+PsAgRJ8+1dg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/estree": "*",
|
||||
|
@ -2468,18 +2496,18 @@
|
|||
}
|
||||
},
|
||||
"run-async": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
|
||||
"integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=",
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz",
|
||||
"integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-promise": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
|
||||
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
|
||||
"version": "6.5.4",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz",
|
||||
"integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
|
@ -2811,9 +2839,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==",
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.0.tgz",
|
||||
"integrity": "sha512-BmndXUtiTn/VDDrJzQE7Mm22Ix3PxgLltW9bSNLoeCY31gnG2OPx0QqJnuc9oMIKioYrz487i6K9o4Pdn0j+Kg==",
|
||||
"dev": true
|
||||
},
|
||||
"type-check": {
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
"prepublishOnly": "npm run build && npm run build:docs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-replace": "^2.2.1",
|
||||
"@rollup/plugin-replace": "^2.3.1",
|
||||
"chai": ">=4.2.0",
|
||||
"eslint": "^6.5.1",
|
||||
"eslint": "^6.8.0",
|
||||
"jsdoc-to-markdown": "^5.0.3",
|
||||
"mocha": "^6.2.1",
|
||||
"rollup": "^1.27.13",
|
||||
"rollup": "^1.31.1",
|
||||
"rollup-plugin-babel-minify": "^9.1.0",
|
||||
"rollup-plugin-commonjs": "^10.1.0",
|
||||
"rollup-plugin-multi-entry": ">=2.1.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ describe('abs', function () {
|
|||
}
|
||||
});
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
@ -65,7 +65,7 @@ describe('bitLength', function () {
|
|||
}
|
||||
});
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
@ -124,7 +124,7 @@ describe('gcd', function () {
|
|||
}
|
||||
});
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
@ -191,7 +191,7 @@ describe('isProbablyPrime', function () {
|
|||
}
|
||||
});
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
@ -235,7 +235,7 @@ describe('lcm', function () {
|
|||
}
|
||||
});
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
@ -326,7 +326,7 @@ describe('max', function () {
|
|||
}
|
||||
});
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
@ -417,7 +417,7 @@ describe('min', function () {
|
|||
}
|
||||
});
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
@ -457,7 +457,7 @@ describe('modInv', function () {
|
|||
}
|
||||
});
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
@ -513,7 +513,7 @@ describe('modPow', function () {
|
|||
});
|
||||
});
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
@ -546,7 +546,7 @@ describe('prime', function () {
|
|||
});
|
||||
});
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
// For the browser test builder to work you MUST import them module in a variable that
|
||||
// For the browser test builder to work you MUST import the module in a variable that
|
||||
// is the camelised version of the package name.
|
||||
const bigintCryptoUtils = require('../dist/bigint-crypto-utils-latest.node');
|
||||
const chai = require('chai');
|
||||
|
|
Loading…
Reference in New Issue