added sha512 and fixed tests