• Returns uniform random string containing at least the given number of bits of entropy.

    For example, randomStringForEntropy(128) will return a 22-character alphanumeric string, while randomStringForEntropy(128, "0123456789") will return a 39-character numeric string, both will contain at least 128 bits of entropy.

    Default charset generates case-sensitive alphanumeric strings (0-9, A-Z, a-z).

    Parameters

    • bits: number
    • charset: string = ALPHANUMERIC
    • prng: RandomSource = defaultRandomSource

    Returns string