You can use
System.cryptography namesapce and use any algorightm to encrypt your password.
or you can do it using SQL too.
//Using SQL
while insertaion encrypt password text with the help of
ENCRYPTBYPASSPHRASE [
^] and decrypt with
DECRYPTBYPASSPHRASE[
^]
it uses TRIPLE DES algorithm for encryption with a 128 bit key.