Advertisement
Guest User

Untitled

a guest
Mar 12th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1.     public void userSignUp(String credentials){
  2.         String[] received = simpleprotocol.decodeMessage(credentials);
  3.         String username = received[1];
  4.         String password = received[2];
  5.        
  6.        
  7.             if(!(userDetails.containsKey(username))){
  8.                 if(username.length() >=5 && username.length() <=20){
  9.                     if(password.length() >= 8 && password.length() <=32){
  10.                         simpleprotocol.createMessage("sign-up", "true","User successfully signed up"); 
  11.                         userDetails.put(username, password);
  12.                     }
  13.                 }
  14.             }
  15. //          try{
  16. //              socket.close();
  17. //          }catch (IOException e){
  18. //              e.printStackTrace();
  19. //          }
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement