Files
common/docs/util-crypto/modules/_random_ashex_.md
T
2019-02-28 09:51:40 +00:00

703 B

Functions

randomAsHex

▸ randomAsHex(length?: number): string

Defined in random/asHex.ts:23

name: randomAsHex

summary: Creates a hex string filled with random bytes.

description: Returns a hex string with the specified (optional) length filled with random bytes.

example:

import { randomAsHex } from '@polkadot/util-crypto';

randomAsHex(); // => 0x...

Parameters:

Name Type Default value
Default value length number 32

Returns: string