diff options
author | Martin Willi <martin@strongswan.org> | 2005-11-16 16:10:47 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2005-11-16 16:10:47 +0000 |
commit | 146e568fe70fc289f65cc0e8d399f9d86e13bf70 (patch) | |
tree | 94fd51fee25be8f2709158d6a85c7700b9be1d9c /Source/charon/utils/randomizer.h | |
parent | a698ba19a4679367ed97e5c671c526e4b273aaff (diff) | |
download | strongswan-146e568fe70fc289f65cc0e8d399f9d86e13bf70.tar.bz2 strongswan-146e568fe70fc289f65cc0e8d399f9d86e13bf70.tar.xz |
- added methods which will allocate mem
Diffstat (limited to 'Source/charon/utils/randomizer.h')
-rw-r--r-- | Source/charon/utils/randomizer.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/Source/charon/utils/randomizer.h b/Source/charon/utils/randomizer.h index ae2bb539c..cf6870aa5 100644 --- a/Source/charon/utils/randomizer.h +++ b/Source/charon/utils/randomizer.h @@ -48,6 +48,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. * * @param this calling randomizer_t object @@ -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. |