title: How to make a String out of a CryptoJS AES Object?
body: <p>I have CryptoJS running and I need to do the following:</p>
  
  <p>I have a username and a password. U encrypt the username with the password:</p>
  
  <pre><code>var encrypted = CryptoJS.AES.encrypt("user", "pass");
  </code></pre>
  
  <p>How can I create a String out of this object to store it in my <code>LocalStorage</code>?</p>
  
  <p>At the end I need to load it from my <code>LocalStorage</code> and compare it to:</p>
  
  <pre><code>var encrypted2 = CryptoJS.AES.encrypt("user", "pass");
  </code></pre>
  
  <p>if <code>encrypted === encrypted2</code> all is fine. </p>
  
  <p>But I can't get out a string of <code>encrypted</code> it's an <code>CryptoJS.AES Object</code> and when I use <code>JSON.stringify</code> I get the error: <code>TypeError: Converting circular structure to JSON</code></p>