1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

More entropy functions made thread-safe (add_source, update_manual, gather)

This commit is contained in:
Paul Bakker
2014-02-06 15:01:20 +01:00
parent 9eae7aae80
commit 47703a0a80
3 changed files with 63 additions and 7 deletions

View File

@ -133,6 +133,7 @@ void entropy_free( entropy_context *ctx );
/**
* \brief Adds an entropy source to poll
* (Thread-safe if POLARSSL_THREADING_C is enabled)
*
* \param ctx Entropy context
* \param f_source Entropy function
@ -148,6 +149,7 @@ int entropy_add_source( entropy_context *ctx,
/**
* \brief Trigger an extra gather poll for the accumulator
* (Thread-safe if POLARSSL_THREADING_C is enabled)
*
* \param ctx Entropy context
*
@ -169,6 +171,7 @@ int entropy_func( void *data, unsigned char *output, size_t len );
/**
* \brief Add data to the accumulator manually
* (Thread-safe if POLARSSL_THREADING_C is enabled)
*
* \param ctx Entropy context
* \param data Data to add