edgeport - v1.0.3
    Preparing search index...

    Function randomHex

    • Returns a random lowercase hex string of byteLength random bytes.

      Parameters

      • byteLength: number = 8

        How many random bytes to draw; defaults to 8 (16 hex characters).

      Returns string

      The hex-encoded random value.

      1.0.3

      import { randomHex } from 'edgeport/util';

      const nonce = randomHex(); // 16 hex chars from 8 random bytes