randomPassword: Generate A Random Password with A Specified Length

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/randomPassword.R

Description

This function generates a random passord sampled from the ASCII table.

Usage

1

Arguments

length

length of the password

replace

sample from the ASCII table with (TRUE) or without (FALSE) replacement?

Value

a character string

Author(s)

Yihui Xie <http://yihui.name>

References

http://cos.name/en/topic/generating-passwords-with-r-from-ascii-characters

See Also

sample

Examples

1
2
3
4
5
6
7
randomPassword()
# set the seed to get fixed password every time; you may just remember the seed
#    and forget the real password because it's reproducible
set.seed(123)
randomPassword()
# long password
randomPassword(20, TRUE)

fun documentation built on May 2, 2019, 6:06 p.m.