문서의 이전 판입니다!


Md5

string GetHash(string usedString)
{ //Create a Hash to send to server
    MD5 md5 = MD5.Create();
    byte[] bytes = Encoding.UTF8.GetBytes(usedString + secretKey);
    byte[] hash = md5.ComputeHash(bytes);
 
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < hash.Length; i++)
    {
        sb.Append(hash[i].ToString("x2"));
    }
    return sb.ToString();
}