# \passphrase_generator= ( # Return a random integer in the range 0 through N-1. \random_int= (\N \r=random_double \r=(eq 1 r 0 r) trunc; * r N ) \word_file # Path to word list file. \list_words= ( #unique; # Do this if you're not sure the words are unique. evaluate void; parse_file (to_str word_file) ) \len=(list_length list_words) lt len 2 void; \strength # Desired strength in bits. \num_words= ( \bits_per_word=(/ (log len) (log 2)) round (+ 0.49 (/ strength bits_per_word)) ) \get_words= (@\\loop\count le count 0 []; \n=(random_int len) \word=(list_at list_words n) \count=(- count 1) \tail=(loop count) [word;tail] ) \\generate=(join " "; get_words num_words) {generate} )