Nonce: Let get_nonce, allocate_nonce return boolean

This commit is contained in:
Reto Buerki
2012-07-16 14:53:34 +02:00
committed by Martin Willi
parent f3ca96b2bf
commit 605985d122
6 changed files with 39 additions and 9 deletions
+4 -2
View File
@@ -35,16 +35,18 @@ struct nonce_gen_t {
*
* @param size size of nonce in bytes
* @param buffer pointer where the generated nonce will be written
* @return TRUE if nonce allocation was succesful, FALSE otherwise
*/
void (*get_nonce) (nonce_gen_t *this, size_t size, u_int8_t *buffer);
bool (*get_nonce) (nonce_gen_t *this, size_t size, u_int8_t *buffer);
/**
* Generates a nonce and allocates space for it.
*
* @param size size of nonce in bytes
* @param chunk chunk which will hold the generated nonce
* @return TRUE if nonce allocation was succesful, FALSE otherwise
*/
void (*allocate_nonce) (nonce_gen_t *this, size_t size, chunk_t *chunk);
bool (*allocate_nonce) (nonce_gen_t *this, size_t size, chunk_t *chunk);
/**
* Destroys a nonce generator object.