@blockchaincommons/rand - v1.0.0-beta.3
    Preparing search index...

    A generator backed by Web Crypto (crypto.getRandomValues), available in every modern browser and in Node >= 15. It holds no state: every instance draws from the same platform source. fillBytes accepts any length; the platform's 65,536-byte per-call quota is handled by filling in chunks.

    CryptoUnavailable from any draw when the environment has no Web Crypto API.

    Implements

    Index
    • get "[toStringTag]"(): string

      Debug label: Object.prototype.toString reports the class name.

      Returns string

    • Fill dest with secure random bytes. Any length: buffers above 65,536 bytes are filled in chunks of at most that size (subarray views, no copies); shorter ones take one getRandomValues call.

      Parameters

      • dest: Uint8Array

      Returns void

      InvalidArgument unless dest is a Uint8Array.