Protecting encoding