Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string user = tbnome.Text;
- string pass = tbpass.Text;
- System.Security.Cryptography.SHA256Managed crypt = new System.Security.Cryptography.SHA256Managed();
- System.Text.StringBuilder hash = new System.Text.StringBuilder();
- byte[] password = crypt.ComputeHash(Encoding.UTF8.GetBytes(pass), 0, Encoding.UTF8.GetByteCount(pass));
- if (tbpass.Text.Count()>0 && tbnome.Text.Count()>0)
- {
- MessageBox.Show("Well Done");
- /*
- //Enviar Username
- byte[] packetUser = protocolSI.Make(ProtocolSICmdType.USER_OPTION_1, user);
- Networkstream.Write(packetUser, 0, packetUser.Length);
- //Enviar Password
- byte[] packetPass = protocolSI.Make(ProtocolSICmdType.USER_OPTION_1, password);
- Networkstream.Write(packetPass, 0, packetPass.Length);
- */
- }
- else
- {
- MessageBox.Show("Credenciais Erradas");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement