title: How to encrypt or decrypt string in javascript
body: <p>I want to encrypt and decrypt string in javascript using following code.But i got crypto js is not defined.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase");
  var decrypted = CryptoJS.AES.decrypt(encrypted, "Secret Passphrase");</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>