(Aesthetics only.)
Interesting; I'd have phrased that via the reversed condition: <code>
return hash_id < HASH_METHOD_NONE ? CF_DIGEST_TYPES[hash_id] : NULL;
</code> (i.e.: if the index is good, use it, else fall back on NULL.)
(In some other contexts, this approach can even save the need for parentheses; e.g. think carefully about what the left operand of + is in <code> !p ? 0 : strlen(p) +1; </code> where the flipped form <code> p ? strlen(p) + 1 : 0 </code> is more likely to match its author's intent.)