summaryrefslogtreecommitdiffstats
path: root/utils/imxtools/sbtools/crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/imxtools/sbtools/crypto.h')
-rw-r--r--utils/imxtools/sbtools/crypto.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/utils/imxtools/sbtools/crypto.h b/utils/imxtools/sbtools/crypto.h
index 169197790b..bdb94bb881 100644
--- a/utils/imxtools/sbtools/crypto.h
+++ b/utils/imxtools/sbtools/crypto.h
@@ -30,8 +30,6 @@
extern "C" {
#endif
-typedef uint8_t byte;
-
/* crypto.cpp */
enum crypto_method_t
{
@@ -52,7 +50,7 @@ struct crypto_key_t
enum crypto_method_t method;
union
{
- byte key[16];
+ uint8_t key[16];
union xorcrypt_key_t xor_key[2];
}u;
};
@@ -68,28 +66,28 @@ int crypto_setup(struct crypto_key_t *key);
/* return 0 on success, <0 on error */
int crypto_apply(
- byte *in_data, /* Input data */
- byte *out_data, /* Output data (or NULL) */
+ uint8_t *in_data, /* Input data */
+ uint8_t *out_data, /* Output data (or NULL) */
int nr_blocks, /* Number of blocks (one block=16 bytes) */
- byte iv[16], /* IV */
- byte (*out_cbc_mac)[16], /* CBC-MAC of the result (or NULL) */
+ uint8_t iv[16], /* IV */
+ uint8_t (*out_cbc_mac)[16], /* CBC-MAC of the result (or NULL) */
bool encrypt);
/* crc.c */
-uint32_t crc(byte *data, int size);
-uint32_t crc_continue(uint32_t previous_crc, byte *data, int size);
+uint32_t crc(uint8_t *data, int size);
+uint32_t crc_continue(uint32_t previous_crc, uint8_t *data, int size);
/* sha1.c */
struct sha_1_params_t
{
- byte hash[20]; /* final hash */
+ uint8_t hash[20]; /* final hash */
void *object; /* pointer to CryptoPP::SHA1 object */
};
void sha_1_init(struct sha_1_params_t *params);
-void sha_1_update(struct sha_1_params_t *params, byte *buffer, int size);
+void sha_1_update(struct sha_1_params_t *params, uint8_t *buffer, int size);
void sha_1_finish(struct sha_1_params_t *params);
-void sha_1_output(struct sha_1_params_t *params, byte *out);
+void sha_1_output(struct sha_1_params_t *params, uint8_t *out);
/* xorcrypt.c */