# crypto-random-hex

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

Latest version **1.0.0** (published 2017-10-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install crypto-random-hex
pnpm add crypto-random-hex
yarn add crypto-random-hex
bun add crypto-random-hex
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-10-31 |
| First published | 2017-10-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | linusu |

## Links

- npm: https://www.npmjs.com/package/crypto-random-hex
- Repository: https://github.com/LinusU/crypto-random-hex
- Homepage: https://github.com/LinusU/crypto-random-hex#readme
- Issues: https://github.com/LinusU/crypto-random-hex/issues
- npm.io page: https://npm.io/package/crypto-random-hex

## Dependencies (1)

- [array-buffer-to-hex](https://npm.io/package/array-buffer-to-hex.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2017-10-31

## README

# Crypto Random Hex

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

## Installation

```sh
npm install --save crypto-random-hex
```

## Usage

```js
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.

Browser | Version
------- | -------
Android | >= 4.4
Chrome  | >= 11
Edge    | >= 12
Firefox | >= 21
IE      | >= 11
Opera   | >= 15
Safari  | >= 6.1
Safari iOS | >= 7.1

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