Does ctx need to be freed and re-newed for multi-HMACs

Viewed 18

Using the EVP_MAC functions, if I am performing multiple MACs do I need to free and new the ctx for each MAC or is the init function sufficient.

Can I

EVP_MAC_CTX_new,

multipe EVP_MAC_init, EVP_MAC_update, EVP_MAC_final,

EVP_MAC_CTX_free

or do I need to

EVP_MAC_CTX_new, EVP_MAC_init, EVP_MAC_update, EVP_MAC_final, EVP_MAC_CTX_free, for each hmac?

0 Answers
Related