Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bigint-secrets

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigint-secrets - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

dist/bigint-secrets-1.2.3.browser.mod.js

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc