Using Crypto-JS (commonjs) in titanium
<p>I am not familiar with commonjs conception, so my strategy might be basically wrong..</p>

<p>I want to use CryptoJS.HMAC() and CryptoJS.SHA256 in titanium </p>

<p>I have downloaded CryptoJS v3.1.2.zip from <a href="https://code.google.com/archive/p/crypto-js/downloads" rel="nofollow">here</a>.</p>

<p>then copy all files under Resources/CryptJS/ .</p>

<p>then I add this last line in core.js</p>

<pre><code>    return C;
}(Math));

module.export = CryptoJS;  //add this line
</code></pre>

<p>now in my app.js</p>

<pre><code>var CryptoJS = require('./CryptoJS/components/core');

CryptoJS.HMAC(CryptoJS.SHA256, dateStamp,  testKey, { asBytes: true});
</code></pre>

<p>however it shows 
　</p>

<p><code>undefined is not a function</code>  error when I call CryptoJS.HMAC()</p>

<p>Can I have help?</p>