Added methods for encryption/decryption.