diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2016-08-30 17:19:30 +1000 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2016-08-30 17:21:05 +1000 |
commit | cf82f208e3ece54fd38cb7c90b77ad91aa3a4c8c (patch) | |
tree | 5fe88d8fdaa9306a28b65a2dad042e0b6577816e /utils/nwztools/upgtools/keysig_search.h | |
parent | de8950d63da5ce199a94e3f094a7e13da3eeca6c (diff) | |
download | rockbox-cf82f208e3ece54fd38cb7c90b77ad91aa3a4c8c.tar.gz rockbox-cf82f208e3ece54fd38cb7c90b77ad91aa3a4c8c.zip |
nwztools: cleanup the code
There was a lot of copy and paste, and the code was just crap. This commit tries
to clarify the code and also document the encryption procedure. Hopefully I didn't
break anything.
Change-Id: I257793010e7cf94f2b090b30bb8608359d3886e3
Diffstat (limited to 'utils/nwztools/upgtools/keysig_search.h')
-rw-r--r-- | utils/nwztools/upgtools/keysig_search.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/nwztools/upgtools/keysig_search.h b/utils/nwztools/upgtools/keysig_search.h index 46639dfb47..9009a73284 100644 --- a/utils/nwztools/upgtools/keysig_search.h +++ b/utils/nwztools/upgtools/keysig_search.h | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <stdbool.h> | 24 | #include <stdbool.h> |
25 | #include <stdint.h> | 25 | #include <stdint.h> |
26 | #include "fwp.h" | ||
26 | 27 | ||
27 | enum keysig_search_method_t | 28 | enum keysig_search_method_t |
28 | { | 29 | { |
@@ -34,7 +35,8 @@ enum keysig_search_method_t | |||
34 | }; | 35 | }; |
35 | 36 | ||
36 | /* notify returns true if the key seems ok */ | 37 | /* notify returns true if the key seems ok */ |
37 | typedef bool (*keysig_notify_fn_t)(void *user, uint8_t key[8], uint8_t sig[8]); | 38 | typedef bool (*keysig_notify_fn_t)(void *user, uint8_t key[NWZ_KEY_SIZE], |
39 | uint8_t sig[NWZ_SIG_SIZE]); | ||
38 | /* returns true if a key was accepted by notify */ | 40 | /* returns true if a key was accepted by notify */ |
39 | typedef bool (*keysig_search_fn_t)(uint8_t *cipher, keysig_notify_fn_t notify, void *user); | 41 | typedef bool (*keysig_search_fn_t)(uint8_t *cipher, keysig_notify_fn_t notify, void *user); |
40 | 42 | ||