Below my code where i'm generating bearer token key
bc2589931f6f7182d53d918fe7c29f387612179d74a45b17a872967433a6d77f //wrong token
62A5B9C82E7C195CF65DDFB4FCE26576F51ACB2DB6AB1F496C424AC7365E0A8 //wrong tokencorrect token
why m i getting wrong token generated from below code?
public string ComputeSha256Hash(string rawData)
{
using (SHA256 sha256Hash = SHA256.Create())
{
byte[] bytes = sha256Hash.ComputeHash(Encoding.UTF8.GetBytes(rawData));
String sty= Convert.ToBase64String(bytes);
//Convert byte array to a string
StringBuilder builder = new StringBuilder();
for (int i = 0; i < bytes.Length; i++)
{
builder.Append(bytes[i].ToString("x2"));
}
Console.WriteLine(builder.ToString());
Console.ReadKey();
return builder.toString();
}
}