I am developing an api project which will have users who will be registering and logging in and out of an mobile application. I will be devloping this application using web api .net core 5. I want to handle the authentication of users via logging in based on a valid jwt token.
My question is which type of hashing is suitable for storing the hashed password in the database. Here are 2 types i have been looking at, which one is more secure?
//sha256 method from the system web helpers namespace
var hash1 = Crypto.SHA256("password");
//hashpassword from the system web helpers namespace
var hash2 = Crypto.HashedPassword("12345");
Both are from micorosft/.net libaries so i am under the impression that they are both secure, however I have noticed there are some websites have a decryption mechanism for sha256. I am edging towards the hashedPassword method in the Cryto class...