PKI.genpass
generates n
cryptographically strong
pseudo-random password by using a given set of allowed characters.
PKI.genpass(n=15, set=c(alphanum, ".", "/"), block=5, sep="-")
String, generated password.
positive integer, number of random elements in the password
character vector, set of characters to use in the
password, ideally its length should be a power of 2 and must be at
most 256. Internal variable alphanum
is equivalent to
c(LETTERS, letters, 0:9)
.
non-negative integer, number of character blocks in the password or 0 if no separated blocks are desired.
string, separator between blocks (only used if 0 <
blocks
< n
).
Simon Urbanek
PKI.genpass
generates a password based on a set of allowable
characters by subsetting the set with bytes generated using
PKI.random
.
If block
is >0 and <n
then blocks of block
characters are separated by the separator string sep
. This is
typically used to guarantee at least one special character in the
password. The default results in a 90-bit random password of the form
XXXXX-XXXXX-XXXXX
.