Added encryption/decryption functions