- added methods which will allocate mem

This commit is contained in:
Martin Willi
2005-11-16 16:10:47 +00:00
parent a698ba19a4
commit 146e568fe7
2 changed files with 59 additions and 1 deletions
+26 -1
View File
@@ -47,6 +47,19 @@ struct randomizer_s {
*/
status_t (*get_random_bytes) (randomizer_t *this,size_t bytes, u_int8_t *buffer);
/**
* @brief Allocates space and writes in random bytes
*
* @param this calling randomizer_t object
* @param bytes Number of bytes to allocate
* @param[out] chunk chunk which will hold the allocated random bytes
* @return
* - SUCCESS
* - OUT_OF_RES
* - FAILED
*/
status_t (*allocate_random_bytes) (randomizer_t *this, size_t bytes, chunk_t *chunk);
/**
* @brief Reads a specific number of bytes from pseudo random device.
*
@@ -59,7 +72,19 @@ struct randomizer_s {
* - FAILED
*/
status_t (*get_pseudo_random_bytes) (randomizer_t *this,size_t bytes, u_int8_t *buffer);
/**
* @brief Allocates space and writes in pseudo random bytes
*
* @param this calling randomizer_t object
* @param bytes Number of bytes to allocate
* @param[out] chunk chunk which will hold the allocated random bytes
* @return
* - SUCCESS
* - OUT_OF_RES
* - FAILED
*/
status_t (*allocate_pseudo_random_bytes) (randomizer_t *this, size_t bytes, chunk_t *chunk);
/**
* @brief Destroys a randomizer_t object.