mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-23 01:31:04 +00:00
hmac_drbg.c: Rename hmac_drbg_reseed_internal->hmac_drbg_reseed_core
This commit is contained in:
parent
213ae2c7a8
commit
b3a06e66d8
|
@ -148,9 +148,9 @@ int mbedtls_hmac_drbg_seed_buf( mbedtls_hmac_drbg_context *ctx,
|
|||
return( 0 );
|
||||
}
|
||||
|
||||
static int hmac_drbg_reseed_internal( mbedtls_hmac_drbg_context *ctx,
|
||||
const unsigned char *additional, size_t len,
|
||||
int use_nonce )
|
||||
static int hmac_drbg_reseed_core( mbedtls_hmac_drbg_context *ctx,
|
||||
const unsigned char *additional, size_t len,
|
||||
int use_nonce )
|
||||
{
|
||||
unsigned char seed[MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT];
|
||||
size_t seedlen = 0;
|
||||
|
@ -230,7 +230,8 @@ exit:
|
|||
int mbedtls_hmac_drbg_reseed( mbedtls_hmac_drbg_context *ctx,
|
||||
const unsigned char *additional, size_t len )
|
||||
{
|
||||
return( hmac_drbg_reseed_internal( ctx, additional, len, 0 ) );
|
||||
return( hmac_drbg_reseed_core( ctx, additional, len,
|
||||
0 /* no nonce */ ) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -276,8 +277,8 @@ int mbedtls_hmac_drbg_seed( mbedtls_hmac_drbg_context *ctx,
|
|||
md_size <= 28 ? 24 : /* 224-bits hash -> 192 bits */
|
||||
32; /* better (256+) -> 256 bits */
|
||||
|
||||
if( ( ret = hmac_drbg_reseed_internal( ctx, custom, len,
|
||||
1 /* add nonce */ ) ) != 0 )
|
||||
if( ( ret = hmac_drbg_reseed_core( ctx, custom, len,
|
||||
1 /* add nonce */ ) ) != 0 )
|
||||
{
|
||||
return( ret );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue