Module generate

Source
Expand description

Generating random bytes and strings.

This module provides two functions for generating random bytes and strings: bytes and string accepting the desired length as Count and Length respectively.

Because of the imposed length restrictions, the functions are safe to use in the context of this crate. See count and length for more information.

Functionsยง

bytes
Generates count random bytes.
string
Generates random strings of length characters from the CHARS set.