mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
code style, code clean up of redundant functions, comments, its many minor fixes across the platform. Sorry for not making 20 commits
This commit is contained in:
parent
6bb7199a7b
commit
cef07dedf6
57 changed files with 672 additions and 521 deletions
|
@ -180,8 +180,7 @@ int mbedtls_cipher_cmac_starts(mbedtls_cipher_context_t *ctx,
|
|||
if (ctx == NULL || ctx->cipher_info == NULL || key == NULL)
|
||||
return (MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA);
|
||||
|
||||
if ((retval = mbedtls_cipher_setkey(ctx, key, (int)keybits,
|
||||
MBEDTLS_ENCRYPT)) != 0)
|
||||
if ((retval = mbedtls_cipher_setkey(ctx, key, (int)keybits, MBEDTLS_ENCRYPT)) != 0)
|
||||
return (retval);
|
||||
|
||||
type = ctx->cipher_info->type;
|
||||
|
@ -405,14 +404,12 @@ int mbedtls_aes_cmac_prf_128(const unsigned char *key, size_t key_length,
|
|||
} else {
|
||||
memset(zero_key, 0, MBEDTLS_AES_BLOCK_SIZE);
|
||||
|
||||
ret = mbedtls_cipher_cmac(cipher_info, zero_key, 128, key,
|
||||
key_length, int_key);
|
||||
ret = mbedtls_cipher_cmac(cipher_info, zero_key, 128, key, key_length, int_key);
|
||||
if (ret != 0)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ret = mbedtls_cipher_cmac(cipher_info, int_key, 128, input, in_len,
|
||||
output);
|
||||
ret = mbedtls_cipher_cmac(cipher_info, int_key, 128, input, in_len, output);
|
||||
|
||||
exit:
|
||||
mbedtls_platform_zeroize(int_key, sizeof(int_key));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue