/*
* Described in header
*/
-prf_t *prf_create(pseudo_random_function_t pseudo_random_function, chunk_t key)
+prf_t *prf_create(pseudo_random_function_t pseudo_random_function)
{
switch (pseudo_random_function)
{
case PRF_HMAC_SHA1:
{
- return (prf_t*)prf_hmac_sha1_create(key);
+ return (prf_t*)prf_hmac_sha1_create();
}
case PRF_HMAC_MD5:
case PRF_HMAC_TIGER:
size_t (*get_block_size) (prf_t *this);
/**
+ * @brief Set the key for this prf
+ *
+ * @param this calling prf
+ * @return block size in bytes
+ */
+ status_t (*set_key) (prf_t *this, chunk_t key);
+
+ /**
* @brief Destroys a prf object.
*
* @param this prf_t object to destroy
* Creates a new prf_t object
*
* @param pseudo_random_function Algorithm to use
- * @param key A chunk containing the key
* @return
* - prf_t if successfully
* - NULL if out of ressources or prf not supported
*/
-prf_t *prf_create(pseudo_random_function_t pseudo_random_function, chunk_t key);
+prf_t *prf_create(pseudo_random_function_t pseudo_random_function);
#endif /*PRF_H_*/
/**
* Creates a new prf_hmac_sha1_t object
*
- * @param key Key to use for this prf
* @return
* - prf_hmac_sha1_t if successfully
* - NULL if out of ressources
*/
-prf_hmac_sha1_t *prf_hmac_sha1_create(chunk_t key);
+prf_hmac_sha1_t *prf_hmac_sha1_create();
#endif /*PRF_HMAC_SHA1_H_*/