Function to convert PRFs to hash algorithms added

This commit is contained in:
Tobias Brunner
2012-06-25 16:35:06 +02:00
parent 903093d439
commit 01850f5d55
2 changed files with 39 additions and 0 deletions
@@ -27,6 +27,7 @@ typedef enum hash_algorithm_t hash_algorithm_t;
typedef struct hasher_t hasher_t;
#include <library.h>
#include <crypto/prfs/prf.h>
#include <crypto/signers/signer.h>
#include <credentials/keys/public_key.h>
@@ -119,6 +120,14 @@ struct hasher_t {
*/
hash_algorithm_t hasher_algorithm_from_oid(int oid);
/**
* Conversion of PRF algorithm to hash algorithm (if based on one).
*
* @param alg prf algorithm
* @return hash algorithm, HASH_UNKNOWN if not based on a hash
*/
hash_algorithm_t hasher_algorithm_from_prf(pseudo_random_function_t alg);
/**
* Conversion of integrity algorithm to hash algorithm (if based on one).
*