diff options
Diffstat (limited to 'Source/charon/transforms/prf_plus.h')
-rw-r--r-- | Source/charon/transforms/prf_plus.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/Source/charon/transforms/prf_plus.h b/Source/charon/transforms/prf_plus.h index fb0e4cac0..c7396b5fc 100644 --- a/Source/charon/transforms/prf_plus.h +++ b/Source/charon/transforms/prf_plus.h @@ -1,7 +1,7 @@ /** * @file prf_plus.h * - * @brief Implements the prf+ function described in IKEv2 draft. + * @brief Interface for prf_plus.h. * */ @@ -30,15 +30,25 @@ typedef struct prf_plus_t prf_plus_t; /** - * Object representing a prf_plus + * @brief Implementation of the prf+ function described in IKEv2 draft. + * + * This class implements the prf+ algorithm. Internalliy it uses a pseudo random + * function, which implements the prf_t interface. + * + * @see IKEv2 draft 2.13 + * + * @ingroup transforms */ struct prf_plus_t { /** * @brief Get pseudo random bytes. * + * Get the next few bytes of the prf+ output. Space + * must be allocated by the caller. + * * @param this calling prf_plus * @param length number of bytes to get - * @param [out]buffer pointer where the generated bytes will be written + * @param[out] buffer pointer where the generated bytes will be written * @return * - SUCCESS in any case */ @@ -47,9 +57,12 @@ struct prf_plus_t { /** * @brief Allocate pseudo random bytes. * + * Get the next few bytes of the prf+ output. This function + * will allocate the required space. + * * @param this calling prf_plus * @param length number of bytes to get - * @param [out]chunk chunk which will hold generated bytes + * @param[out] chunk chunk which will hold generated bytes * @return * - SUCCESS in any case * - OUT_OF_RES if space could not be allocated @@ -57,7 +70,7 @@ struct prf_plus_t { status_t (*allocate_bytes) (prf_plus_t *this, size_t length, chunk_t *chunk); /** - * @brief Destroys a prf_plus object. + * @brief Destroys a prf_plus_t object. * * @param this prf_plus_t object to destroy * @return @@ -67,7 +80,7 @@ struct prf_plus_t { }; /** - * Creates a new prf_plus_t object + * @brief Creates a new prf_plus_t object. * * Seed will be cloned. prf will * not be cloned, must be destroyed outside after @@ -77,7 +90,9 @@ struct prf_plus_t { * @param seed input seed for prf * @return * - prf_plus_t if successfully - * - NULL if out of ressources or hash not supported + * - NULL if out of ressources + * + * @ingroup transforms */ prf_plus_t *prf_plus_create(prf_t *prf, chunk_t seed); |