A helper javascript model for encrypting and decrypting the string