updated c implementation of shift-cipher