I am working on an ASP.NET Core 6 Web API with C#. Currently a function in my controller takes a plain text password submitted by the user along with other information and saves it into a Users table.
How can I save the password securely instead of plain text? I am looking for a simple but secure solution. Are there any functions which simply generate a unique password hash which I can then save to the database?
For example :
user.Password = hash(request.password);
I have search older similar questions but as all the answers seem several years old I felt it may be worth while seeking out more current thoughts on this.