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
@@ -35,16 +35,18 @@ struct private_nonce_nonceg_t {
rng_t* rng;
};
METHOD(nonce_gen_t, get_nonce, void,
METHOD(nonce_gen_t, get_nonce, bool,
private_nonce_nonceg_t *this, size_t size, u_int8_t *buffer)
{
this->rng->get_bytes(this->rng, size, buffer);
return TRUE;
}
METHOD(nonce_gen_t, allocate_nonce, void,
METHOD(nonce_gen_t, allocate_nonce, bool,
private_nonce_nonceg_t *this, size_t size, chunk_t *chunk)
{
this->rng->allocate_bytes(this->rng, size, chunk);
return TRUE;
}
METHOD(nonce_gen_t, destroy, void,