password ( n charset -- string )
Generating random passwords

Prev:ascii-password ( n -- string )


Vocabulary
random.passwords

Inputs
npassword length
charseta string


Outputs
stringa string


Word description
Generate a password of length n by randomly selecting characters from the charset string. All characters of the charset have equal probability of appearing at any position of the result.

If n = 0, return empty string. If n < 0, throw an error.

secure-random-generator is used as the randomness source.

Definition