Fixed encryption functions