SHARE
TWEET

Untitled

a guest Jun 5th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string user = tbnome.Text;
  2.             string pass = tbpass.Text;
  3.  
  4.             System.Security.Cryptography.SHA256Managed crypt = new System.Security.Cryptography.SHA256Managed();
  5.             System.Text.StringBuilder hash = new System.Text.StringBuilder();
  6.          
  7.             byte[] password = crypt.ComputeHash(Encoding.UTF8.GetBytes(pass), 0, Encoding.UTF8.GetByteCount(pass));
  8.  
  9.             if (tbpass.Text.Count()>0 && tbnome.Text.Count()>0)
  10.             {
  11.                 MessageBox.Show("Well Done");
  12. /*
  13.                 //Enviar Username
  14.                 byte[] packetUser = protocolSI.Make(ProtocolSICmdType.USER_OPTION_1, user);
  15.                 Networkstream.Write(packetUser, 0, packetUser.Length);
  16.  
  17.                 //Enviar Password
  18.                 byte[] packetPass = protocolSI.Make(ProtocolSICmdType.USER_OPTION_1, password);
  19.                 Networkstream.Write(packetPass, 0, packetPass.Length);
  20.   */            
  21.                    
  22.  
  23.             }
  24.             else
  25.             {
  26.                 MessageBox.Show("Credenciais Erradas");
  27.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top