updated c implementation for shift-cipher