# randombytes

> random bytes from browserify stand alone

Latest version **2.1.0** (published 2019-02-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install randombytes
pnpm add randombytes
yarn add randombytes
bun add randombytes
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2019-02-19 |
| First published | 2015-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/randombytes) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 102 |
| Maintainers | cwmma, dcousens, indutny, jprichardson |
| Keywords | crypto, random |

## Links

- npm: https://www.npmjs.com/package/randombytes
- Repository: https://github.com/crypto-browserify/randombytes
- Issues: https://github.com/crypto-browserify/randombytes/issues
- npm.io page: https://npm.io/package/randombytes

## Dependencies (1)

- [safe-buffer](https://npm.io/package/safe-buffer.md) ^5.1.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2019-02-19
- 2.0.6 — 2018-01-10
- 2.0.5 — 2017-06-07
- 2.0.4 — 2017-06-02
- 2.0.3 — 2016-03-02
- 2.0.2 — 2016-01-13
- 2.0.1 — 2015-01-22
- 2.0.0 — 2015-01-18
- 1.0.0 — 2015-01-15

## README

randombytes
===

[![Version](http://img.shields.io/npm/v/randombytes.svg)](https://www.npmjs.org/package/randombytes) [![Build Status](https://travis-ci.org/crypto-browserify/randombytes.svg?branch=master)](https://travis-ci.org/crypto-browserify/randombytes)

randombytes from node that works in the browser.  In node you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues

```js
var randomBytes = require('randombytes');
randomBytes(16);//get 16 random bytes
randomBytes(16, function (err, resp) {
  // resp is 16 random bytes
});
```

---
_Source: https://npm.io/package/randombytes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
