encrypt a message based on the given text