Added the password encrypt/decrypt and write/read to/from file functions