Function added to convert a hash algorithm to an HMAC integrity algorithm

This commit is contained in:
Tobias Brunner
2013-05-08 15:02:39 +02:00
parent 047fca1169
commit 199fdcadae
2 changed files with 77 additions and 0 deletions
+11
View File
@@ -153,6 +153,17 @@ hash_algorithm_t hasher_algorithm_from_prf(pseudo_random_function_t alg);
hash_algorithm_t hasher_algorithm_from_integrity(integrity_algorithm_t alg,
size_t *length);
/**
* Conversion of hash algorithm to integrity algorithm (if based on a hash).
*
* @param alg hash algorithm
* @param length length of the signature
* @return integrity algorithm, AUTH_UNDEFINED if none is known
* based on the given hash function
*/
integrity_algorithm_t hasher_algorithm_to_integrity(hash_algorithm_t alg,
size_t length);
/**
* Conversion of hash algorithm into ASN.1 OID.
*