First things first, this is likely a complicated question (I'm not sure if this is the correct place to ask this) but I've been thinking of a secure way for a user to log in to a service (for this example we'll go with a website) using a username and a password, while the server itself does not store either of these directly. 

I came up with this in a lesson on hashing in school, so I wouldn't be surprised if there's a simple reason as to why this is not used by websites but I haven't found any examples at all of this being used online. This would use a form of asymmetric encryption on the server side to combine the username and password into one unique "userLoginID" that would be stored on the server. Code similar to this would be used on the server side, where "encrypt" would be a one-way encryption function:

```
userLoginID == "331845364410495642424788" # Just an example
if (encrypt(inputtedUsername,inputtedPassword) == userLoginID)
    return True
else
    return False

```

If anyone has any examples of similar processes to this or an explanation as to why it is not used more commonly, that would be great. Using this method, the user would have a different "Display Name" and "User ID" if necessary that they would be referred to by others / the server. I personally can't see any disadvantages to using this system so I would like it if someone with more knowledge in server security could explain a flaw in this type of system.

As far as I can tell, a hacker would have to brute force both the username and the password, and even if they had access to the full list of user login IDs they would not be able to do anything with them, but I'm certain this can't be flawless as I've just come up with it on a whim. Thanks, and I appreciate that this probably isn't the best place or way to ask this.