Compare commits
3 Commits
eabe966971
...
v0.3.1
Author | SHA1 | Date | |
---|---|---|---|
8657f3c13d | |||
93954add96 | |||
5793a18358 |
@ -3,7 +3,7 @@ type: docker
|
||||
name: main
|
||||
|
||||
trigger:
|
||||
- tag
|
||||
event: tag
|
||||
|
||||
steps:
|
||||
- name: build-windows
|
||||
@ -25,7 +25,7 @@ steps:
|
||||
- build-windows
|
||||
- build-linux
|
||||
settings:
|
||||
base_url: 'https://git.jfmonty2.com/jfmonty2/passphrase.git'
|
||||
base_url: 'https://git.jfmonty2.com'
|
||||
files:
|
||||
- passphrase_linux
|
||||
- passphrase.exe
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Package
|
||||
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
author = "Joseph Montanaro"
|
||||
description = "Passphrase generator and dictionary builder"
|
||||
license = "none"
|
||||
|
@ -33,9 +33,6 @@ const dict = loadWords()
|
||||
|
||||
|
||||
proc genPassphrase(length, dictSize: int): string =
|
||||
if dictSize < 100 or dictSize > dict.len:
|
||||
quit("Dictionary size must be between 100 and " & $dict.len, 1)
|
||||
|
||||
var rands = newSeq[uint64](length)
|
||||
discard randomBytes(rands)
|
||||
|
||||
@ -65,7 +62,7 @@ proc parseInput(): (int, int) =
|
||||
try:
|
||||
length = parseInt(params[0])
|
||||
except ValueError:
|
||||
quit(params[0] & " is not a valid passphrase length.", 1)
|
||||
quit('"' & params[0] & "\" is not a valid passphrase length.", 1)
|
||||
|
||||
if params.len > 1:
|
||||
try:
|
||||
@ -73,7 +70,7 @@ proc parseInput(): (int, int) =
|
||||
if dictSize < 100 or dictSize > dict.len:
|
||||
quit("Dictionary size must be between 100 and " & $dict.len, 1)
|
||||
except ValueError:
|
||||
quit(params[1] & " is not a valid dictionary size.", 1)
|
||||
quit('"' & params[1] & "\" is not a valid dictionary size.", 1)
|
||||
|
||||
result = (length, dictSize)
|
||||
|
||||
|
Reference in New Issue
Block a user