Added SHA512 support and support for returning a promise when signing