[Solved] Define a value to EditText

Use this. If (edittext.getText().toString()==myPreProgrammedString){ start next activity } else{ show warning wrong password } Usually you would put something like this in a onClick method of a login button. But I use something similar in textwatchers afterTextChanged method to check if the entered text is in a list and then enable the OK button. BTW: … Read more

[Solved] Encrypting the password using salt in c# [closed]

(As suggested, I’ve replaced my previous salt generation method with something that should be more secure) To generate a random salt: public static string GenerateRandomSalt(RNGCryptoServiceProvider rng, int size) { var bytes = new Byte[size]; rng.GetBytes(bytes); return Convert.ToBase64String(bytes); } var rng = new RNGCryptoServiceProvider(); var salt1 = GenerateRandomSalt(rng, 16); var salt2 = GenerateRandomSalt(rng, 16); // etc. … Read more