Skip to content

Commit 7a10660

Browse files
committedJun 15, 2015
README cleanup, slightly improved docs
1 parent 4848d6b commit 7a10660

File tree

2 files changed

+31
-10
lines changed

2 files changed

+31
-10
lines changed
 

‎README.md

+25-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,31 @@ This repo contains the Racket code that I used to generate markov models and
66
huffman trees for [Molis Hai](http://www.brinckerhoff.org/molis-hai/pwgen.html),
77
a random password generator that generates relatively memorable strings.
88

9-
Give it a try!
109

11-
If you want to run this code, you'll probably want to start with "letter-frequency.rkt".
10+
It's a Racket Package, which means you can install it using
11+
12+
```
13+
raco pkg install molis-hai
14+
```
15+
16+
You can run it using
17+
18+
```
19+
raco molis-hai
20+
```
21+
22+
This will give you a single password using an order-2 model and 56 bits of entropy.
1223

13-
Honestly, this should probably all be licensed using Matt Might's CRAPL, rather
14-
than the noble Mozilla Public License 2.0.
24+
You could instead run
1525

26+
```
27+
raco molis-hai -o 3 -b 80 -n 4
28+
```
29+
30+
to generate 4 passwords using a third-order model with 80 bits of entropy each.
31+
32+
When I'm generating secure root passwords, I generate 8 passwords using 59 bits
33+
of entropy, and then pick the one I like the best. This guarantees at least 56
34+
bits of entropy in the resulting password.
35+
36+
Give it a try!

‎molis-hai/cmd-line.rkt

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
(command-line
2828
#:program (short-program+command-name)
2929
#:once-each
30-
[("-b" "--bits") str "Specify number of bits of entropy"
30+
[("-b" "--bits") bits "Specify number of bits of entropy"
3131
(set-numeric-parameter-from-string
32-
entropy-bits str 'set-entropy-bits 500)]
33-
[("-n" "--passwords") str "Specify number of passwords generated"
32+
entropy-bits bits 'set-entropy-bits 500)]
33+
[("-n" "--passwords") pwds "Specify number of passwords generated"
3434
(set-numeric-parameter-from-string
35-
num-pwds str 'set-num-pwds 100)]
36-
[("-o" "--model-order") str "Specify the order of the model"
35+
num-pwds pwds 'set-num-pwds 100)]
36+
[("-o" "--model-order") order "Specify the order of the model"
3737
(set-numeric-parameter-from-string
38-
model-order str 'set-model-order 10)])
38+
model-order order 'set-model-order 10)])
3939

4040
(define atotc-path (build-path here "a-tale-of-two-cities.txt"))
4141

0 commit comments

Comments
 (0)
Please sign in to comment.