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

expo-random

Package Overview
Dependencies
Maintainers
27
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-random

Expo universal module for random bytes

  • 14.0.1
  • latest
  • sdk-51
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
151K
increased by7.67%
Maintainers
27
Weekly downloads
 
Created

What is expo-random?

The expo-random package is a utility for generating cryptographically secure random numbers. It is particularly useful in scenarios where security and unpredictability are crucial, such as in generating tokens, keys, or other secure identifiers.

What are expo-random's main functionalities?

Generating Random Bytes

This feature allows you to generate a specified number of random bytes asynchronously. The example code generates 16 random bytes and logs them to the console.

const { getRandomBytesAsync } = require('expo-random');

(async () => {
  const randomBytes = await getRandomBytesAsync(16);
  console.log(randomBytes);
})();

Generating Random Bytes Synchronously

This feature allows you to generate a specified number of random bytes synchronously. The example code generates 16 random bytes and logs them to the console.

const { getRandomBytes } = require('expo-random');

const randomBytes = getRandomBytes(16);
console.log(randomBytes);

Other packages similar to expo-random

Keywords

FAQs

Package last updated on 23 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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