[gnutls-help] gnutls_mac_algorithm_t and gnutls_digest_algorithm_t 1:1 compatible?

Daniel Vassdal spam.vassdal at hotmail.com
Wed Jul 3 15:00:22 CEST 2013

Is it reliable to cast from gnutls_mac_algorithm_t to gnutls_digest_algorithm_t?
I want to let the user dynamically select hashing algorithm from what their gnutls installation supports, so what I'm doing is:
gnutls_digest_algorithm_t selected_hash = (gnutls_digest_algorithm_t)gnutls_mac_get_id(hash_name);
Is this prone to failure? I see the enums have a comment in them telling to align them. Could this change?
Is there a better way to do what I want to do?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20130703/43bc9d86/attachment.html>

More information about the Gnutls-help mailing list