Add encoding to security service.