Updated encryption/decryption methods.