Tell the user how many characters they supplied

This commit is contained in:
niten 2022-11-09 22:00:13 -08:00
parent f6f8aee433
commit 7746c295fb
1 changed files with 2 additions and 1 deletions

View File

@ -25,7 +25,8 @@
(defn -main [& args]
(let [seed-string (str/join "" args)]
(when (>= 32 (count seed-string))
(throw (ex-info "key generation requires a seed string of >32 characters." {})))
(throw (ex-info "key generation requires a seed string of >= 32 characters."
{ :seed-length (count seed-string)})))
(-> seed-string
(string->seed)
(generate-key)