How can I SHA512 a string in C#?

后端 未结 10 1334
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 18:35

I am trying to write a function to take a string and sha512 it like so?

public string SHA512(string input)
{
     string hash;

     ~magic~

     return has         


        
10条回答
  •  一个人的身影
    2020-12-08 19:05

    512/8 = 64, so 64 is indeed the correct size. Perhaps you want to convert it to hexadecimal after the SHA512 algorithm.

    See also: How do you convert Byte Array to Hexadecimal String, and vice versa?

提交回复
热议问题