Pregunta de entrevista de Hitachi Vantara

Write a function to encrypt a string based on the shift integer.