Get it on Google Play


Wm뮤 :: c# MD5

블로그 이미지
가끔 그림그리거나 3D모델링하거나
취미로 로봇만드는
퇴직한 전자과 게임프로그래머
2020.3.48f1 , 2022.3.6f1 주로 사용
모카쨩
@Ahzkwid

Recent Comment

Archive


2020. 8. 25. 17:17 Unity/C#

v1

    public string GetMD5(byte[] data)
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        byte[] hash = System.Security.Cryptography.MD5.Create().ComputeHash(data);
        foreach (byte b in hash)
        {
            sb.Append(b.ToString("X2"));
        }
        return sb.ToString();
    }

 

 

v2

public string GetMD5(byte[] data)
{
    byte[] bytes = System.Security.Cryptography.MD5.Create().ComputeHash(data);
    return System.BitConverter.ToString(bytes).Replace("-", "");
}

'Unity > C#' 카테고리의 다른 글

failed to connect to localhost port 80: Connection  (0) 2020.09.01
UnityWebRequest  (0) 2020.08.20
형변환 모음  (0) 2020.08.11
posted by 모카쨩

  • total
  • today
  • yesterday

Recent Post

저사양 유저용 블로그 진입