Domanda di colloquio di Microsoft

How to create a Cesar's encrypt/decrypt function for a given string and offset.