added encryption/decryption with custom key