I could give you the hooks to use to encrypt values, but the problem is the unencrypting bit. As far as I know, most encryptions only go one way. For example, WordPress passwords are encrypted and cannot be retrived. However, when a password is inputted, it is encryted to see if it matches the encrypted value in the database. Did you have something specific in mind for the encryption so it could be reversed?