Fixed sha512 and allowed base to pad base 16 encodings