Blockchain Commons Tags TypeScript Library - v1.0.0-alpha.13
    Preparing search index...

    Class Xoshiro256StarStar

    Xoshiro256** PRNG implementation. A fast, high-quality pseudorandom number generator.

    Index

    Methods

    • Get the internal state as an array of 4 u64 values.

      Returns [bigint, bigint, bigint, bigint]

    • Serialize the state to 32 bytes (little-endian).

      Returns Uint8Array

    • Generate the next u32 value (upper bits of u64 for better quality).

      Returns number

    • Generate the next n bytes.

      Parameters

      • len: number

      Returns Uint8Array

    • Fill a buffer with random bytes.

      Parameters

      • dest: Uint8Array

      Returns void