Created
October 10, 2019 17:58
-
-
Save JosiahParry/324e657ff025d9eac62ba41221a45216 to your computer and use it in GitHub Desktop.
Simple function for generating diceware passwords
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
dice_words <- read_tsv("https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt", | |
col_names = c("dice_id", "dice_word"), col_types = "cc") | |
diceware <- function(n_words) { | |
map_dfr(1:n_words, ~tibble(dice_id = paste(sample(1:6, 5, replace = TRUE), collapse = ""))) %>% | |
left_join(dice_words) | |
} | |
diceware(6) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment