Google interview question

Algorithm question about parsing and encrypting strings