Added additional code for sha512 implementation.