How to convert a byte array (MD5 hash) into a string (36 chars)?

后端 未结 7 1963
走了就别回头了
走了就别回头了 2021-01-14 01:18

I\'ve got a byte array that was created using a hash function. I would like to convert this array into a string. So far so good, it will give me hexadecimal string.

7条回答
  •  余生分开走
    2021-01-14 01:49

    If you want a shorter string and can accept [a-zA-Z0-9] and + and / then look at Convert.ToBase64String

提交回复
热议问题