Don't call key.len() multiple times in the hmac implementation.

I believe this is a slightly better way to write this match