Provide a get_hmac() function

Refactor the functionality to find an HMAC function into a separate
function.
Support PBKDF2 PRF argument

Support specifying a pseudorandom function for PBKDF2 key derivation. It
currently supports any HMAC that the MAC checking also supports.