if using SHA-512 but not SHA-384, fix so that HMAC still works