cryptiles

API v6.0.x

Installation:

npm: npm install @hapi/cryptiles

yarn: yarn add @hapi/cryptiles

Methods

randomString(<Number> size)

Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string.

randomAlphanumString(<Number> size)

Returns a cryptographically strong pseudo-random alphanumeric data string. Takes a size argument for the length of the string.

randomDigits(<Number> size)

Returns a cryptographically strong pseudo-random data string consisting of only numerical digits (0-9). Takes a size argument for the length of the string.

clipboard