summaryrefslogtreecommitdiffstats
path: root/utils/nwztools/upgtools/keysig_search.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-08-30 17:19:30 +1000
committerAmaury Pouly <amaury.pouly@gmail.com>2016-08-30 17:21:05 +1000
commitcf82f208e3ece54fd38cb7c90b77ad91aa3a4c8c (patch)
tree5fe88d8fdaa9306a28b65a2dad042e0b6577816e /utils/nwztools/upgtools/keysig_search.h
parentde8950d63da5ce199a94e3f094a7e13da3eeca6c (diff)
downloadrockbox-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.h4
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 @@
#include <stdbool.h>
#include <stdint.h>
+#include "fwp.h"
enum keysig_search_method_t
{
@@ -34,7 +35,8 @@ enum keysig_search_method_t
};
/* notify returns true if the key seems ok */
-typedef bool (*keysig_notify_fn_t)(void *user, uint8_t key[8], uint8_t sig[8]);
+typedef bool (*keysig_notify_fn_t)(void *user, uint8_t key[NWZ_KEY_SIZE],
+ uint8_t sig[NWZ_SIG_SIZE]);
/* returns true if a key was accepted by notify */
typedef bool (*keysig_search_fn_t)(uint8_t *cipher, keysig_notify_fn_t notify, void *user);