Changed hash to sha512