SHA512-HMAC bug fix and hash function self-test support