For reversible AES encryption, you can use this code.
But I see you are trying to encrypt password, which is considered to be a bad idea. If you need to store user passwords, use hashing algorithms – I highly suggest SHA-512 with PBKDF2 (50 000 derivations should be enough).