Pergunta de entrevista da empresa Hitachi Vantara

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