Exemple #1
0
    public void AccountLoginCorrect(string username, string pwd)
    {
        string salt             = "";
        string CorrectHashedPwd = "";
        string answer           = "";

        password = pwd;

        UnityEngine.WWWForm form = new UnityEngine.WWWForm();
        form.AddField("Command", "GetHashSalt");
        form.AddField("acctName", username);
        WWWLoader.instance.myDelegate += OnGetHashAndSalt;
        WWWLoader.Load("http://unitytowerdefense.com/WebService.php", form);
    }
Exemple #2
0
    public void CreateAccount(string name, string password)
    {
        string Salt   = CreateSalt(12);
        string Hash   = CreatePasswordHash(password, Salt);
        string answer = "";

        WWWForm form = new WWWForm();

        form.AddField("Command", "CreateAccount");
        form.AddField("acctName", name);
        form.AddField("acctHash", Hash);
        form.AddField("acctSalt", Salt);

        WWWLoader.instance.myDelegate += OnReceiveCreateAccountResponse;
        WWWLoader.Load("http://unitytowerdefense.com/WebService.php", form);
    }