[gnutls-help] gnutls_mac_algorithm_t and gnutls_digest_algorithm_t 1:1 compatible?
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...
More information about the Gnutls-help