-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add runtime integrity self-testing of wordlists
The code now self-tests the SHA-256 hashes of the wordlists with which it was compiled. I am a bit nervous about build-time bugs in platform shell tools which might behave differently in different locales, etc. Will *your* platform's shell tools process UTF-8 strings without mangling? Now, you can be sure with `make check`. This test currently runs by default. It is slow, so I will probably disable it when the undocumented -T flag is not used. I do think the proportion of test code to feature code is growing appropriately, for a utility which pertains to Other People's Money. I also added code to reproduce a wordlist on stdout, in a format identical to the source file. However, that function cannot yet be used due to lack of language selection UI. The language selection UI is next!
- Loading branch information
Showing
4 changed files
with
85 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ LDADD=-lmd | |
|
||
SEDRE=-E | ||
|
||
HASHPROG=sha256 -q | ||
|
||
.include "Makefile.inc" | ||
|
||
.include <bsd.prog.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ SEDRE=-r | |
|
||
all: easyseed | ||
|
||
HASHPROG=sha256sum | ||
|
||
include Makefile.inc | ||
|
||
easyseed: wordlist.h $(OBJS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters