Generate sha512 using hashlib and not hmac.

Is there a reason that it's currently using the hmac library instead of hashlib? I could definitely be missing something.

If there's no benefit, the negative is that it's confusing to someone trying to understand the code. This might, for example, cause someone to not feed in user generated entropy into the output from /dev/random (or urandom) because they don't understand what's going on.

You know better than me, do what you think best.