703 B
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