Strings and bytes
ixia.passphrase
Generates an XKCD-style passphrase made up from n
words (based on the file specified by words_path
), separated by sep
(-
by default).
⚠️ The default word list is not available on Windows.
ixia.rand_bytes
Generates n
random bytes. Defaults to 32.
ixia.rand_hex
Returns a hex string composed of n
random bytes.
ixia.rand_line
Returns a random line from a file. Given a string, assumes it is
a path, reads it, and returns a random line from the read content.
Given a readable IO object, reads it,
and returns a random line from the read content.
ixia.rand_urlsafe
Returns a random URL-safe text string, composed of n
bytes, in Base64 encoding. Defaults to 32.