generate_token: Generate the tokens

Description Usage Arguments Details Value Author(s) See Also


Generates the tokens.


generate_token(n_words, method = c("pseudorandom", "random"))



The number of tokens to generate.


The method used to draw the random numbers. See below for more details.


This function generates as many tokens as needed to create the passphrase. Currently, two methods can be used to generate the random tokens.

  1. The simplest and the default (pseudorandom) uses the function sample to simulate the dice rolls. Numbers generated this way are not truly random but are a decent approximation.

  2. The other option (random) uses the random package that gets truly random numbers by converting atmospheric noise into numbers. The main issue is that someone could monitor your network and intercept the numbers that are being used. If you are concerned about this, use a physical dice.

Note that if you want to use the random method, you will need an internet connection. The service that provides these random numbers ( has daily quotas, don't go too crazy (if you need to, you can purchase additional bits, see


A character vector representing the generated tokens.


Francois Michonneau

See Also the website that generates the true random numbers, and the random package from Dirk Eddelbuettel.

riceware documentation built on May 2, 2019, 3:42 p.m.