You can use the salt encryption, as explained in the following article:
 
https://www.c-sharpcorner.com/UploadFile/145c93/save-password-using-salted-hashing/