Adding encoding function for an Exponential Cipher