From dbeb6db1b55a50dedf17e7d78ddb6fe9eebc2a63 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Wed, 4 Jan 2017 16:55:53 +0100 Subject: nwztools: cleanup crypto, switch MD5 to Crypto++ We already use Crypto++ for DES anyway, and using OpenSSL is not great because of its incompatible licence. Change-Id: I78771b84c1708795a0c0c30afa5bdfe4885dea4e --- utils/nwztools/upgtools/fwp.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'utils/nwztools/upgtools/fwp.h') diff --git a/utils/nwztools/upgtools/fwp.h b/utils/nwztools/upgtools/fwp.h index 0d928fb..32fe260 100644 --- a/utils/nwztools/upgtools/fwp.h +++ b/utils/nwztools/upgtools/fwp.h @@ -33,11 +33,13 @@ extern "C" { #define NWZ_SIG_SIZE 8 #define NWZ_EXPKEY_SIZE (NWZ_KEY_SIZE * NWZ_KEY_SIZE) #define NWZ_DES_BLOCK 8 +#define NWZ_MD5_SIZE 16 -int fwp_read(void *in, int size, void *out, uint8_t *key); -int fwp_write(void *in, int size, void *out, uint8_t *key); +/* size must be a multiple of 8 */ +void fwp_read(void *in, int size, void *out, uint8_t *key); +void fwp_write(void *in, int size, void *out, uint8_t *key); void fwp_setkey(char key[8]); -int fwp_crypt(void *buf, int size, int mode); +void fwp_crypt(void *buf, int size, int mode); #ifdef __cplusplus } -- cgit v1.1