Encryption and decryption - using strings and recursion