1 # crypto-random-string [![Build Status](https://travis-ci.org/sindresorhus/crypto-random-string.svg?branch=master)](https://travis-ci.org/sindresorhus/crypto-random-string)
3 > Generate a [cryptographically strong](https://en.m.wikipedia.org/wiki/Strong_cryptography) random string
5 Can be useful for creating an identifier, slug, salt, fixture, etc.
11 $ npm install --save crypto-random-string
18 const cryptoRandomString = require('crypto-random-string');
20 cryptoRandomString(10);
27 ### cryptoRandomString(length)
33 Length of the returned string.
38 - [random-int](https://github.com/sindresorhus/random-int) - Generate a random integer
39 - [random-float](https://github.com/sindresorhus/random-float) - Generate a random float
40 - [random-item](https://github.com/sindresorhus/random-item) - Get a random item from an array
41 - [random-boolean](https://github.com/arthurvr/random-boolean) - Get a random boolean
42 - [random-obj-key](https://github.com/sindresorhus/random-obj-key) - Get a random key from an object
43 - [random-obj-prop](https://github.com/sindresorhus/random-obj-prop) - Get a random property from an object
44 - [unique-random](https://github.com/sindresorhus/unique-random) - Generate random numbers that are consecutively unique
49 MIT © [Sindre Sorhus](https://sindresorhus.com)