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...
1
2
3

Parameters:

Name Type Default value
Default value length number 32

Returns: string


Last Updated: 2/27/2019, 1:37:39 PM