Socket
Socket
Sign inDemoInstall

crypto-random-hex

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    crypto-random-hex

Get a, cryptographically strong, string of random hexadecimal characters.


Version published
Weekly downloads
2K
increased by15.68%
Maintainers
1
Install size
5.70 kB
Created
Weekly downloads
 

Readme

Source

Crypto Random Hex

Get a, cryptographically strong, string of random hexadecimal characters.

Installation

npm install --save crypto-random-hex

Usage

const randomHex = require('crypto-random-hex')

console.log(randomHex(4))
//=> b55802d9

API

randomHex(bytes: number): string

Returns bytes number of bytes cryptographically strong random data, encoded as a string of hexadecimal characters.

Browser support

This module works both in Node.js, and inside modern browsers.

BrowserVersion
Android>= 4.4
Chrome>= 11
Edge>= 12
Firefox>= 21
IE>= 11
Opera>= 15
Safari>= 6.1
Safari iOS>= 7.1

FAQs

Last updated on 31 Oct 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc