You could separate set and clear into two functions. Also, the terms were confusing to me. Maybe call the param "algo" instead of "tag", and "usage" instead of "setBits", and I'd call the functions differently:
NSS_GetAlgorithmUsage(SECOidTag algo, PRUint32 *usageFlags); NSS_EnableAlgorithmUsage(SECOidTag algo, PRUint32 usageFlags); NSS_DisableAlgorithmUsage(SECOidTag algo, PRUint32 usageFlags);
(The more abstract something is, the harder it is to comprehend what you mean, here "tag" and "policy", because they could mean anything.)
You could separate set and clear into two functions.
Also, the terms were confusing to me. Maybe call the param "algo" instead of "tag", and "usage" instead of "setBits", and I'd call the functions differently:
NSS_GetAlgorith mUsage( SECOidTag algo, PRUint32 *usageFlags); ithmUsage( SECOidTag algo, PRUint32 usageFlags); rithmUsage( SECOidTag algo, PRUint32 usageFlags);
NSS_EnableAlgor
NSS_DisableAlgo
(The more abstract something is, the harder it is to comprehend what you mean, here "tag" and "policy", because they could mean anything.)