Lines Matching refs:MBEDTLS_ENTROPY_BLOCK_SIZE
114 MBEDTLS_ENTROPY_BLOCK_SIZE, in mbedtls_entropy_init()
172 unsigned char tmp[MBEDTLS_ENTROPY_BLOCK_SIZE]; in entropy_update()
176 if( use_len > MBEDTLS_ENTROPY_BLOCK_SIZE ) in entropy_update()
184 use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; in entropy_update()
290 unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE]; in mbedtls_entropy_func()
292 if( len > MBEDTLS_ENTROPY_BLOCK_SIZE ) in mbedtls_entropy_func()
333 memset( buf, 0, MBEDTLS_ENTROPY_BLOCK_SIZE ); in mbedtls_entropy_func()
343 mbedtls_sha512_update( &ctx->accumulator, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ); in mbedtls_entropy_func()
348 mbedtls_sha512( buf, MBEDTLS_ENTROPY_BLOCK_SIZE, buf, 0 ); in mbedtls_entropy_func()
357 mbedtls_sha256_update( &ctx->accumulator, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ); in mbedtls_entropy_func()
362 mbedtls_sha256( buf, MBEDTLS_ENTROPY_BLOCK_SIZE, buf, 0 ); in mbedtls_entropy_func()
388 if( ( ret = mbedtls_entropy_func( ctx, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ) ) != 0 ) in mbedtls_entropy_update_nv_seed()
391 if( mbedtls_nv_seed_write( buf, MBEDTLS_ENTROPY_BLOCK_SIZE ) < 0 ) in mbedtls_entropy_update_nv_seed()
395 memset( buf, 0, MBEDTLS_ENTROPY_BLOCK_SIZE ); in mbedtls_entropy_update_nv_seed()
396 mbedtls_entropy_update_manual( ctx, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ); in mbedtls_entropy_update_nv_seed()
407 unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE]; in mbedtls_entropy_write_seed_file()
412 if( ( ret = mbedtls_entropy_func( ctx, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ) ) != 0 ) in mbedtls_entropy_write_seed_file()
415 if( fwrite( buf, 1, MBEDTLS_ENTROPY_BLOCK_SIZE, f ) != MBEDTLS_ENTROPY_BLOCK_SIZE ) in mbedtls_entropy_write_seed_file()
583 unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE] = { 0 }; in mbedtls_entropy_self_test()
584 unsigned char acc[MBEDTLS_ENTROPY_BLOCK_SIZE] = { 0 }; in mbedtls_entropy_self_test()