VComply interview question

Encryption and decrypt the string