Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String username = editTextUsername.getText().toString();
- String password = editTextPassword.getText().toString();
- String hashedPW = BCrypt.hashpw(password, BCrypt.gensalt());
- User user = new User(username, hashedPW);
- user.save();
- String username = editTextUsername.getText().toString();
- String enteredPassword = editTextPassword.getText().toString();
- String hashedPW = BCrypt.hashpw(enteredPassword, BCrypt.gensalt());
- User u = usercontroller.getUser(username); //gets user object
- String password = u.getPassword;
- BCrypt.checkpw(password, hashedPW); //always returns false
- BCrypt.checkpw(password, hashedPW);
- BCrypt.checkpw(enteredPassword, password);
Add Comment
Please, Sign In to add comment