mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-02 14:11:12 +00:00
cmac: avoid useless wrapping of function
probably a leftover from an earlier stage
This commit is contained in:
parent
5f8639fea2
commit
a878d3b6e3
|
@ -210,9 +210,10 @@ do { \
|
||||||
/*
|
/*
|
||||||
* Generate tag on complete message
|
* Generate tag on complete message
|
||||||
*/
|
*/
|
||||||
static int cmac_generate( mbedtls_cmac_context *ctx,
|
int mbedtls_cmac_generate( mbedtls_cmac_context *ctx,
|
||||||
const unsigned char *input, size_t in_len,
|
const unsigned char *input, size_t in_len,
|
||||||
unsigned char *tag, size_t tag_len )
|
unsigned char *tag, size_t tag_len )
|
||||||
|
|
||||||
{
|
{
|
||||||
unsigned char state[16];
|
unsigned char state[16];
|
||||||
unsigned char M_last[16];
|
unsigned char M_last[16];
|
||||||
|
@ -260,13 +261,6 @@ static int cmac_generate( mbedtls_cmac_context *ctx,
|
||||||
#undef XOR_128
|
#undef XOR_128
|
||||||
#undef UPDATE_CMAC
|
#undef UPDATE_CMAC
|
||||||
|
|
||||||
int mbedtls_cmac_generate( mbedtls_cmac_context *ctx,
|
|
||||||
const unsigned char *input, size_t in_len,
|
|
||||||
unsigned char *tag, size_t tag_len )
|
|
||||||
{
|
|
||||||
return( cmac_generate( ctx, input, in_len, tag, tag_len ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Authenticated decryption
|
* Authenticated decryption
|
||||||
*/
|
*/
|
||||||
|
@ -279,7 +273,8 @@ int mbedtls_cmac_verify( mbedtls_cmac_context *ctx,
|
||||||
unsigned char i;
|
unsigned char i;
|
||||||
int diff;
|
int diff;
|
||||||
|
|
||||||
if( ( ret = cmac_generate( ctx, input, in_len, check_tag, tag_len ) ) != 0 )
|
if( ( ret = mbedtls_cmac_generate( ctx, input, in_len,
|
||||||
|
check_tag, tag_len ) ) != 0 )
|
||||||
{
|
{
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue