bigint-secrets
Advanced tools
Comparing version 1.2.2 to 1.2.3
{ | ||
"name": "bigint-secrets", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Cryptographically secure random numbers and prime generation/testing using native JS (stage 3) implementation of BigInt", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -37,6 +37,6 @@ # bigint-secrets | ||
// Get a cryptographically secure random number between 1 and 2**256 bits. | ||
const rnd = secrets.randBetween(BigInt(2**256)); | ||
const rnd = secrets.randBetween(BigInt(2)**256); | ||
``` | ||
From a browser: | ||
From a browser, you can just load the module in a html page as: | ||
```html | ||
@@ -48,3 +48,3 @@ <script type="module"> | ||
// Get a cryptographically secure random number between 1 and 2**256 bits. | ||
const rnd = await bigintSecrets.randBetween(BigInt(2 ** 256)); | ||
const rnd = await bigintSecrets.randBetween(BigInt(2) ** 256); | ||
alert(rnd); | ||
@@ -51,0 +51,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89685
19
2847
1