fun randomPassword () =
let
- val proc = Unix.execute ("/usr/bin/apg", ["/usr/bin/apg", "-n", "1", "-m", "10"])
+ val proc = Unix.execute ("/usr/bin/pwgen", ["-cCnB", "8", "1"])
in
case TextIO.inputLine (Unix.textInstreamOf proc) of
- NONE => raise Fail "Couldn't execute apg"
+ NONE => raise Fail "Couldn't execute pwgen"
| SOME line =>
case String.tokens Char.isSpace line of
[s] => s
- | _ => raise Fail "Couldn't parse output of apg"
+ | _ => raise Fail "Couldn't parse output of pwgen"
end
val allLower = CharVector.map Char.toLower