Added encryption functions