CryptoHelper.GetMd5String C# (CSharp) Method

GetMd5String() public static method

public static GetMd5String ( String instr ) : string
instr String
return string
    public static string GetMd5String(String instr)
    {
        return GetMd5String(utf8Encoding.GetBytes(instr));
    }

Same methods

CryptoHelper::GetMd5String ( byte data ) : string

Usage Example

Beispiel #1
0
    IEnumerator SubmitScore(string name, int diff, int health, int hits, int dmg, int wpdmg, int score, string rank)
    {
        WWWForm form = new WWWForm();

        string key = "pleasedontcheatitsnotniceorfair";

        form.AddField("key", "pleasedontcheatitsnotniceorfair");
        form.AddField("name", name);
        form.AddField("difficulty", diff);
        form.AddField("healthmod", health);
        form.AddField("hits", hits);
        form.AddField("dmg", dmg);
        form.AddField("wpdmg", wpdmg);
        form.AddField("score", score);
        form.AddField("rank", rank);

        string hash = CryptoHelper.GetMd5String(name + hits + dmg + wpdmg + score + rank + key);

        Debug.Log(name + hits + dmg + wpdmg + score + rank + key);
        Debug.Log(hash);

        form.AddField("hash", hash);

        WWW www = new WWW(gm.scoreUrl, form);

        yield return(www);

        // note Unity looks for crossdomain.xml at the server root on port 80. Can't change this otherwise. Also need php scripts.
        Debug.LogWarning("Post failed for url: " + gm.scoreUrl + " omitted form data " + www.error);
    }
All Usage Examples Of CryptoHelper::GetMd5String