Forge Component
Published on 2015-11-29 by Ricardo Silva
11 votes
Published on 2015-11-29 by Ricardo Silva

SHA512 algorithm?

Hello Ahmed,

Are you asking if this API supports SHA512?

The HashPassword action uses SHA512. The ComputeHash action can be parametrized to use SHA512 but uses SHA256 by default.


So how can i pass the Hash key  as implemented in the C# Code 

public static string SignString512(string stringToSign, string secretKey)


            byte[] secretkeyBytes = Convert.FromBase64String(secretKey);

            byte[] inputBytes = Encoding.UTF8.GetBytes(stringToSign);

            using (var hmac = new HMACSHA512(secretkeyBytes))


                byte[] hashValue = hmac.ComputeHash(inputBytes);

                return System.Convert.ToBase64String(hashValue);



That's not a SHA512, it's an HMAC-SHA512.

Currently CryptoAPI does not have any function that supports that. You'll probably be better off building your own extension at this point.