How do I encrypt and decrypt password? I want to encrypt a string then save it to the database. then later, i want to decrypt the password that the user inputs from a textbox. then decrypt the password from the db to see if matches with the user input.